From ce29c1c42fc4b444264ce8de8fa54d1154b2a7d9 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 18 Mar 2018 16:38:05 -0400 Subject: [PATCH] DataReader: Correct return type of operator= It's questionable to not return a reference to the instance being assigned to. It's also quite misleading in terms of expected behavior relative to everything else. This fixes it to make it consistent with other classes. --- 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 709f5f6012..7813e22e60 100644 --- a/Source/Core/VideoCommon/DataReader.h +++ b/Source/Core/VideoCommon/DataReader.h @@ -16,10 +16,10 @@ public: DataReader() = default; DataReader(u8* src, u8* end_) : buffer(src), end(end_) {} u8* GetPointer() { return buffer; } - u8* operator=(u8* src) + DataReader& operator=(u8* src) { buffer = src; - return src; + return *this; } size_t size() const { return end - buffer; }