mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3b6d56cab3
commit
3e41da29fb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user