mirror of
https://github.com/dolphin-emu/hwtests.git
synced 2026-01-31 01:05:17 +01:00
Allow using bitfield's copy-assignment operator
This commit is contained in:
@@ -131,13 +131,9 @@ public:
|
||||
// so that we can use this within unions
|
||||
constexpr BitField() = default;
|
||||
|
||||
// We explicitly delete the copy assignment operator here, because the
|
||||
// default copy assignment would copy the full storage value, rather than
|
||||
// just the bits relevant to this particular bit field.
|
||||
// Ideally, we would just implement the copy assignment to copy only the
|
||||
// relevant bits, but we're prevented from doing that because the savestate
|
||||
// code expects that this class is trivially copyable.
|
||||
BitField& operator=(const BitField&) = delete;
|
||||
// Warning! This copies ALL storage bits, not just the bits represented by this bitfield.
|
||||
// This exists so that unions can be copyable.
|
||||
BitField& operator=(const BitField&) = default;
|
||||
|
||||
BitField& operator=(T val)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user