Skip to content
Permalink
Browse files
Merge pull request #6548 from lioncash/const
LinearDiskCache: Don't cast away const in Read()
  • Loading branch information
delroth committed Mar 28, 2018
2 parents ea166a4 + 0084428 commit ac97f04
Showing 1 changed file with 3 additions and 3 deletions.
@@ -163,13 +163,13 @@ class LinearDiskCache
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

0 comments on commit ac97f04

Please sign in to comment.