mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-19 04:09:44 -06:00
Bitfield: Cast value to storage type in assignment operator
This allows us to use enum classes in bitfields.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user