From 2feb1a8ba6746a264ef4cc7ad7097c5c8b136e05 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 6 Aug 2018 12:52:21 -0400 Subject: kernel/event: Make data members private Instead we can simply provide accessors to the required data instead of giving external read/write access to the variables directly. --- src/core/hle/kernel/event.h | 12 ++++++++---- src/yuzu/debugger/wait_tree.cpp | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/hle/kernel/event.h b/src/core/hle/kernel/event.h index 1c99911b2..3c20c05e8 100644 --- a/src/core/hle/kernel/event.h +++ b/src/core/hle/kernel/event.h @@ -31,10 +31,9 @@ public: return HANDLE_TYPE; } - ResetType reset_type; ///< Current ResetType - - bool signaled; ///< Whether the event has already been signaled - std::string name; ///< Name of event (optional) + ResetType GetResetType() const { + return reset_type; + } bool ShouldWait(Thread* thread) const override; void Acquire(Thread* thread) override; @@ -47,6 +46,11 @@ public: private: Event(); ~Event() override; + + ResetType reset_type; ///< Current ResetType + + bool signaled; ///< Whether the event has already been signaled + std::string name; ///< Name of event (optional) }; } // namespace Kernel diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index f5a5697a0..2acfdb8a9 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp @@ -316,7 +316,7 @@ std::vector> WaitTreeEvent::GetChildren() const { list.push_back(std::make_unique( tr("reset type = %1") - .arg(GetResetTypeQString(static_cast(object).reset_type)))); + .arg(GetResetTypeQString(static_cast(object).GetResetType())))); return list; } -- cgit v1.2.3