1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

Don't use old-style casts. This prevents compiler warnings when CommandLine.h

is used in projects that have stricter warning control than LLVM. This also
helps us find casts more easily if we ever need to.

llvm-svn: 28263
This commit is contained in:
Reid Spencer 2006-05-12 19:20:55 +00:00
parent 772647518f
commit 1a7e67d221

View File

@ -997,7 +997,7 @@ class bits_storage {
template<class T>
static unsigned Bit(const T &V) {
unsigned BitPos = (unsigned)V;
unsigned BitPos = reinterpret_cast<unsigned>(V);
assert(BitPos < sizeof(unsigned) * 8 &&
"enum exceeds width of bit vector!");
return 1 << BitPos;
@ -1038,7 +1038,7 @@ class bits_storage<DataType, bool> {
template<class T>
static unsigned Bit(const T &V) {
unsigned BitPos = (unsigned)V;
unsigned BitPos = reinterpret_cast<unsigned>(V);
assert(BitPos < sizeof(unsigned) * 8 &&
"enum exceeds width of bit vector!");
return 1 << BitPos;