Various formatting and consistency fixes

This commit is contained in:
Stevoisiak
2014-11-13 21:28:27 -05:00
parent 5fb94230cd
commit b25e1a2eb4
61 changed files with 143 additions and 178 deletions

View File

@ -46,18 +46,15 @@ bool CVolumeWiiCrypted::RAWRead( u64 _Offset, u64 _Length, u8* _pBuffer ) const
// Medal Of Honor Heroes 2 read this DVD offset for PartitionsInfo
// and, PartitionsInfo is not encrypted, let's read it directly.
if (!m_pReader->Read(_Offset, _Length, _pBuffer))
{
return(false);
}
return true;
else
return true;
}
bool CVolumeWiiCrypted::Read(u64 _ReadOffset, u64 _Length, u8* _pBuffer) const
{
if (m_pReader == nullptr)
{
return(false);
}
while (_Length > 0)
{
@ -118,16 +115,12 @@ void CVolumeWiiCrypted::GetTMD(u8* _pBuffer, u32 * _sz) const
std::string CVolumeWiiCrypted::GetUniqueID() const
{
if (m_pReader == nullptr)
{
return std::string();
}
char ID[7];
if (!Read(0, 6, (u8*)ID))
{
return std::string();
}
ID[6] = '\0';
@ -149,16 +142,12 @@ IVolume::ECountry CVolumeWiiCrypted::GetCountry() const
std::string CVolumeWiiCrypted::GetMakerID() const
{
if (m_pReader == nullptr)
{
return std::string();
}
char makerID[3];
if (!Read(0x4, 0x2, (u8*)&makerID))
{
return std::string();
}
makerID[2] = '\0';
@ -181,16 +170,12 @@ std::vector<std::string> CVolumeWiiCrypted::GetNames() const
u32 CVolumeWiiCrypted::GetFSTSize() const
{
if (m_pReader == nullptr)
{
return 0;
}
u32 size;
if (!Read(0x428, 0x4, (u8*)&size))
{
return 0;
}
return size;
}
@ -198,16 +183,12 @@ u32 CVolumeWiiCrypted::GetFSTSize() const
std::string CVolumeWiiCrypted::GetApploaderDate() const
{
if (m_pReader == nullptr)
{
return std::string();
}
char date[16];
if (!Read(0x2440, 0x10, (u8*)&date))
{
return std::string();
}
date[10] = '\0';
@ -217,25 +198,17 @@ std::string CVolumeWiiCrypted::GetApploaderDate() const
u64 CVolumeWiiCrypted::GetSize() const
{
if (m_pReader)
{
return m_pReader->GetDataSize();
}
else
{
return 0;
}
}
u64 CVolumeWiiCrypted::GetRawSize() const
{
if (m_pReader)
{
return m_pReader->GetRawSize();
}
else
{
return 0;
}
}
bool CVolumeWiiCrypted::CheckIntegrity() const