diff options
| author | Stenzek <stenzek@gmail.com> | 2017-09-07 23:00:12 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2017-09-11 19:40:25 +1000 |
| commit | 4d36f0cc87d2cc2bc40ec1c36a65623dc3822f01 (patch) | |
| tree | 3e44fa44f13e1be5a1d8c1f2c7fa49ef86a299f7 /Source/Core | |
| parent | 9d169449a7898cefab29a5e033f82560cfcdef5e (diff) | |
Bitfield: Cast value to storage type in assignment operator
This allows us to use enum classes in bitfields.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Common/BitField.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/BitField.h b/Source/Core/Common/BitField.h index 5832fbcc3f..c8a81a092a 100644 --- a/Source/Core/Common/BitField.h +++ b/Source/Core/Common/BitField.h @@ -136,7 +136,7 @@ public: __forceinline BitField& operator=(T val) { - storage = (storage & ~GetMask()) | ((val << position) & GetMask()); + storage = (storage & ~GetMask()) | ((static_cast<StorageType>(val) << position) & GetMask()); return *this; } |
