MemoryPatches: In-class initialize is_enabled state for MemoryPatch instances
Given this is what occurs in both constructors (as one just passes through to another), we can just initialize the member directly. While we're at it, amend the struct to follow the general ordering convention of: <new types> <functions> <variables>
This commit is contained in:
parent
4c33bb8dda
commit
397b27e665
|
@ -11,7 +11,7 @@
|
||||||
namespace Common::Debug
|
namespace Common::Debug
|
||||||
{
|
{
|
||||||
MemoryPatch::MemoryPatch(u32 address_, std::vector<u8> value_)
|
MemoryPatch::MemoryPatch(u32 address_, std::vector<u8> value_)
|
||||||
: address(address_), value(std::move(value_)), is_enabled(State::Enabled)
|
: address(address_), value(std::move(value_))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,12 +20,12 @@ struct MemoryPatch
|
||||||
Disabled
|
Disabled
|
||||||
};
|
};
|
||||||
|
|
||||||
u32 address;
|
|
||||||
std::vector<u8> value;
|
|
||||||
State is_enabled;
|
|
||||||
|
|
||||||
MemoryPatch(u32 address, std::vector<u8> value);
|
MemoryPatch(u32 address, std::vector<u8> value);
|
||||||
MemoryPatch(u32 address, u32 value);
|
MemoryPatch(u32 address, u32 value);
|
||||||
|
|
||||||
|
u32 address;
|
||||||
|
std::vector<u8> value;
|
||||||
|
State is_enabled = State::Enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MemoryPatches
|
class MemoryPatches
|
||||||
|
|
Loading…
Reference in New Issue