From fd956f6c697582449aa06597d5c863f00c6061f0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 18 Mar 2018 16:18:38 -0400 Subject: [PATCH] DataReader: Make size() and Peek() const member functions These don't modify class state, so they can be const qualified. --- Source/Core/VideoCommon/DataReader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/DataReader.h b/Source/Core/VideoCommon/DataReader.h index 51430d508d..788346d514 100644 --- a/Source/Core/VideoCommon/DataReader.h +++ b/Source/Core/VideoCommon/DataReader.h @@ -22,9 +22,9 @@ public: return src; } - __forceinline size_t size() { return end - buffer; } + __forceinline size_t size() const { return end - buffer; } template - __forceinline T Peek(int offset = 0) + __forceinline T Peek(int offset = 0) const { T data; std::memcpy(&data, &buffer[offset], sizeof(T));