mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-27 00:05:34 +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)
|
__forceinline BitField& operator=(T val)
|
||||||
{
|
{
|
||||||
storage = (storage & ~GetMask()) | ((val << position) & GetMask());
|
storage = (storage & ~GetMask()) | ((static_cast<StorageType>(val) << position) & GetMask());
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user