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.
This commit is contained in:
Lioncash 2018-03-18 16:38:05 -04:00
parent ffade65c55
commit ce29c1c42f

View File

@ -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; }