DataReader: Provide a const qualified variant of GetPointer()

This wouldn't be much of a data reader if it can't access the
read-only data pointer in read-only contexts. Especially if it
can get a writable equivalent in contexts that aren't read-only.
This commit is contained in:
Lioncash 2018-03-18 16:43:27 -04:00
parent ce29c1c42f
commit b21a00d290
1 changed files with 1 additions and 0 deletions

View File

@ -16,6 +16,7 @@ public:
DataReader() = default;
DataReader(u8* src, u8* end_) : buffer(src), end(end_) {}
u8* GetPointer() { return buffer; }
const u8* GetPointer() const { return buffer; }
DataReader& operator=(u8* src)
{
buffer = src;