Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 28, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/Core/Common/LinearDiskCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down