Volume: Use ReadSwapped more

Most of the Volume code was written before this
convenience function was added. Let's use it more.

Also deleting m_pReader nullptr checks that are
unnecessary because of Read (which ReadSwapped calls)
already having a nullptr check.
This commit is contained in:
JosJuice
2017-03-09 19:44:38 +01:00
parent cf848b7c42
commit 135733e285
3 changed files with 16 additions and 68 deletions

View File

@ -112,11 +112,7 @@ std::string CVolumeWAD::GetMakerID() const
bool CVolumeWAD::GetTitleID(u64* buffer) const
{
if (!Read(m_offset + 0x01DC, sizeof(u64), reinterpret_cast<u8*>(buffer)))
return false;
*buffer = Common::swap64(*buffer);
return true;
return ReadSwapped(m_offset + 0x01DC, buffer, false);
}
u16 CVolumeWAD::GetRevision() const