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:
parent
ce29c1c42f
commit
b21a00d290
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue