mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
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:
@ -16,10 +16,10 @@ public:
|
|||||||
DataReader() = default;
|
DataReader() = default;
|
||||||
DataReader(u8* src, u8* end_) : buffer(src), end(end_) {}
|
DataReader(u8* src, u8* end_) : buffer(src), end(end_) {}
|
||||||
u8* GetPointer() { return buffer; }
|
u8* GetPointer() { return buffer; }
|
||||||
u8* operator=(u8* src)
|
DataReader& operator=(u8* src)
|
||||||
{
|
{
|
||||||
buffer = src;
|
buffer = src;
|
||||||
return src;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t size() const { return end - buffer; }
|
size_t size() const { return end - buffer; }
|
||||||
|
Reference in New Issue
Block a user