mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-25 11:46:27 +00:00
DataReader: Make size() and Peek() const member functions
These don't modify class state, so they can be const qualified.
This commit is contained in:
parent
0c128f3abe
commit
fd956f6c69
1 changed files with 2 additions and 2 deletions
|
@ -22,9 +22,9 @@ public:
|
|||
return src;
|
||||
}
|
||||
|
||||
__forceinline size_t size() { return end - buffer; }
|
||||
__forceinline size_t size() const { return end - buffer; }
|
||||
template <typename T, bool swapped = true>
|
||||
__forceinline T Peek(int offset = 0)
|
||||
__forceinline T Peek(int offset = 0) const
|
||||
{
|
||||
T data;
|
||||
std::memcpy(&data, &buffer[offset], sizeof(T));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue