LinearDiskCache: Don't cast away const in Read()

We really shouldn't make the out pointer in the read function const and
then summarily cast it away. Also alters Write to be consistent with
casting.
This commit is contained in:
Lioncash 2018-03-27 21:07:51 -04:00
parent c55b3a664d
commit 008442898c
1 changed files with 3 additions and 3 deletions

View File

@ -163,13 +163,13 @@ private:
template <typename D>
bool Write(const D* data, u32 count = 1)
{
return m_file.write((const char*)data, count * sizeof(D)).good();
return m_file.write(reinterpret_cast<const char*>(data), count * sizeof(D)).good();
}
template <typename D>
bool Read(const D* data, u32 count = 1)
bool Read(D* data, u32 count = 1)
{
return m_file.read((char*)data, count * sizeof(D)).good();
return m_file.read(reinterpret_cast<char*>(data), count * sizeof(D)).good();
}
struct Header