From ca48b21ffc2ad92ee6533651531bf874063e9e66 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Fri, 25 Oct 2019 23:30:44 +1000 Subject: [PATCH] StateWrapper: Support switching modes --- src/common/state_wrapper.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/state_wrapper.h b/src/common/state_wrapper.h index 4a5382f9f..073b40072 100644 --- a/src/common/state_wrapper.h +++ b/src/common/state_wrapper.h @@ -28,6 +28,7 @@ public: bool IsReading() const { return (m_mode == Mode::Read); } bool IsWriting() const { return (m_mode == Mode::Write); } Mode GetMode() const { return m_mode; } + void SetMode(Mode mode) { m_mode = mode; } /// Overload for integral or floating-point types. Writes bytes as-is. template || std::is_floating_point_v, int> = 0>