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:
Lioncash 2018-05-29 18:03:12 -04:00
parent 4c33bb8dda
commit 397b27e665
2 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@
namespace Common::Debug
{
MemoryPatch::MemoryPatch(u32 address_, std::vector<u8> value_)
: address(address_), value(std::move(value_)), is_enabled(State::Enabled)
: address(address_), value(std::move(value_))
{
}

View File

@ -20,12 +20,12 @@ struct MemoryPatch
Disabled
};
u32 address;
std::vector<u8> value;
State is_enabled;
MemoryPatch(u32 address, std::vector<u8> value);
MemoryPatch(u32 address, u32 value);
u32 address;
std::vector<u8> value;
State is_enabled = State::Enabled;
};
class MemoryPatches