mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Tier0: add overload for reading pointer data and fix write overload
Write should've been a pointer instead.
This commit is contained in:
parent
b65d74e8c7
commit
7f25ce7e42
@ -46,7 +46,13 @@ public:
|
||||
// Purpose: reads any value from the file with specified size
|
||||
//-----------------------------------------------------------------------------
|
||||
template<typename T>
|
||||
void Read(T& tValue, size_t nSize)
|
||||
void Read(T* tValue, const size_t nSize)
|
||||
{
|
||||
if (IsReadable())
|
||||
m_Stream.read(reinterpret_cast<char*>(tValue), nSize);
|
||||
}
|
||||
template<typename T>
|
||||
void Read(T& tValue, const size_t nSize)
|
||||
{
|
||||
if (IsReadable())
|
||||
m_Stream.read(reinterpret_cast<char*>(&tValue), nSize);
|
||||
@ -84,7 +90,7 @@ public:
|
||||
// Purpose: writes any value to the file with specified size
|
||||
//-----------------------------------------------------------------------------
|
||||
template<typename T>
|
||||
void Write(T tValue, size_t nSize)
|
||||
void Write(T* tValue, size_t nSize)
|
||||
{
|
||||
if (!IsWritable())
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user