From 0a15aaaa123482ecf7b2490a13e33a884416d51c Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 6 Jul 2016 20:33:05 +0200 Subject: Move DiscIO enums to a new file At first there weren't many enums in Volume.h, but the number has been growing, and I'm planning to add one more for regions. To not make Volume.h too large, and to avoid needing to include Volume.h in code that doesn't use volume objects, I'm moving the enums to a new file. I'm also turning them into enum classes while I'm at it. --- Source/Core/DiscIO/VolumeWad.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Source/Core/DiscIO/VolumeWad.cpp') diff --git a/Source/Core/DiscIO/VolumeWad.cpp b/Source/Core/DiscIO/VolumeWad.cpp index a6cb48ca77..90ad2045be 100644 --- a/Source/Core/DiscIO/VolumeWad.cpp +++ b/Source/Core/DiscIO/VolumeWad.cpp @@ -16,6 +16,7 @@ #include "Common/MsgHandler.h" #include "Common/StringUtil.h" #include "DiscIO/Blob.h" +#include "DiscIO/Enums.h" #include "DiscIO/Volume.h" #include "DiscIO/VolumeWad.h" @@ -54,10 +55,10 @@ bool CVolumeWAD::Read(u64 _Offset, u64 _Length, u8* _pBuffer, bool decrypt) cons return m_pReader->Read(_Offset, _Length, _pBuffer); } -IVolume::ECountry CVolumeWAD::GetCountry() const +Country CVolumeWAD::GetCountry() const { if (!m_pReader) - return COUNTRY_UNKNOWN; + return Country::COUNTRY_UNKNOWN; // read the last digit of the titleID in the ticket u8 country_code; @@ -114,16 +115,16 @@ u16 CVolumeWAD::GetRevision() const return Common::swap16(revision); } -IVolume::EPlatform CVolumeWAD::GetVolumeType() const +Platform CVolumeWAD::GetVolumeType() const { - return WII_WAD; + return Platform::WII_WAD; } -std::map CVolumeWAD::GetLongNames() const +std::map CVolumeWAD::GetLongNames() const { std::vector name_data(NAMES_TOTAL_BYTES); if (!Read(m_opening_bnr_offset + 0x9C, NAMES_TOTAL_BYTES, name_data.data())) - return std::map(); + return std::map(); return ReadWiiNames(name_data); } -- cgit v1.2.3