mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 23:11:14 +01:00
Bitfield: Cast value to storage type in assignment operator
This allows us to use enum classes in bitfields.
This commit is contained in:
parent
9d169449a7
commit
4d36f0cc87
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user