mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-02 14:19:02 +00:00
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
1 changed files with 1 additions and 0 deletions
|
@ -16,6 +16,7 @@ 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; }
|
||||||
|
const u8* GetPointer() const { return buffer; }
|
||||||
DataReader& operator=(u8* src)
|
DataReader& operator=(u8* src)
|
||||||
{
|
{
|
||||||
buffer = src;
|
buffer = src;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue