From 397b27e6652a3f81875669036ac0e50aaea6bb48 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 29 May 2018 18:03:12 -0400 Subject: [PATCH] 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: --- Source/Core/Common/Debug/MemoryPatches.cpp | 2 +- Source/Core/Common/Debug/MemoryPatches.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/Common/Debug/MemoryPatches.cpp b/Source/Core/Common/Debug/MemoryPatches.cpp index aaded7343d..38f96863d0 100644 --- a/Source/Core/Common/Debug/MemoryPatches.cpp +++ b/Source/Core/Common/Debug/MemoryPatches.cpp @@ -11,7 +11,7 @@ namespace Common::Debug { MemoryPatch::MemoryPatch(u32 address_, std::vector value_) - : address(address_), value(std::move(value_)), is_enabled(State::Enabled) + : address(address_), value(std::move(value_)) { } diff --git a/Source/Core/Common/Debug/MemoryPatches.h b/Source/Core/Common/Debug/MemoryPatches.h index cee814c6b5..6307833abe 100644 --- a/Source/Core/Common/Debug/MemoryPatches.h +++ b/Source/Core/Common/Debug/MemoryPatches.h @@ -20,12 +20,12 @@ struct MemoryPatch Disabled }; - u32 address; - std::vector value; - State is_enabled; - MemoryPatch(u32 address, std::vector value); MemoryPatch(u32 address, u32 value); + + u32 address; + std::vector value; + State is_enabled = State::Enabled; }; class MemoryPatches