Просмотр исходного кода

BitField: Cast enum values to proper integer type.

Tony Wasserka 12 лет назад
Родитель
Сommit
0da8e2eacc
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/common/bit_field.h

+ 1 - 1
src/common/bit_field.h

@@ -142,7 +142,7 @@ public:
 
 
     __forceinline BitField& operator=(T val)
     __forceinline BitField& operator=(T val)
     {
     {
-        storage = (storage & ~GetMask()) | ((val << position) & GetMask());
+        storage = (storage & ~GetMask()) | (((StorageType)val << position) & GetMask());
         return *this;
         return *this;
     }
     }