diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index b990b744ca..4e5ad6f9c2 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -22,7 +22,6 @@ #include "Common/CommonTypes.h" #include "Common/File.h" #include "Common/FileUtil.h" -#include "Common/Hash.h" #include "Common/HttpRequest.h" #include "Common/Image.h" #include "Common/IniFile.h" @@ -30,7 +29,6 @@ #include "Common/StringUtil.h" #include "Common/Swap.h" -#include "Core/Boot/Boot.h" #include "Core/Config/UISettings.h" #include "Core/ConfigManager.h" #include "Core/IOS/ES/Formats.h" @@ -41,13 +39,15 @@ #include "DiscIO/Volume.h" #include "DiscIO/WiiSaveBanner.h" -constexpr const char* COVER_URL = "https://art.gametdb.com/wii/cover/%s/%s.png"; - namespace UICommon { -static const std::string EMPTY_STRING; +namespace +{ +constexpr char COVER_URL[] = "https://art.gametdb.com/wii/cover/%s/%s.png"; -static bool UseGameCovers() +const std::string EMPTY_STRING; + +bool UseGameCovers() { // We ifdef this out on Android because accessing the config before emulation start makes us crash. // The Android GUI handles covers in Java anyway, so this doesn't make us lose any functionality. @@ -57,6 +57,7 @@ static bool UseGameCovers() return Config::Get(Config::MAIN_USE_GAME_COVERS); #endif } +} // Anonymous namespace DiscIO::Language GameFile::GetConfigLanguage() const { @@ -111,8 +112,9 @@ GameFile::LookupUsingConfigLanguage(const std::mapbegin(), response->end()), png_path); } bool GameFile::DefaultCoverChanged() diff --git a/Source/Core/UICommon/GameFile.h b/Source/Core/UICommon/GameFile.h index a31dc21b8a..aced331685 100644 --- a/Source/Core/UICommon/GameFile.h +++ b/Source/Core/UICommon/GameFile.h @@ -23,7 +23,7 @@ namespace UICommon { struct GameBanner { - std::vector buffer{}; + std::vector buffer; u32 width{}; u32 height{}; bool empty() const { return buffer.empty(); } @@ -32,7 +32,7 @@ struct GameBanner struct GameCover { - std::vector buffer{}; + std::vector buffer; bool empty() const { return buffer.empty(); } void DoState(PointerWrap& p); }; @@ -44,9 +44,9 @@ bool operator!=(const GameBanner& lhs, const GameBanner& rhs); class GameFile final { public: - GameFile() = default; - explicit GameFile(const std::string& path); - ~GameFile() = default; + GameFile(); + explicit GameFile(std::string path); + ~GameFile(); bool IsValid() const; const std::string& GetFilePath() const { return m_file_path; } @@ -109,30 +109,30 @@ private: // CACHE_REVISION in GameFileCache.cpp is incremented. bool m_valid{}; - std::string m_file_path{}; - std::string m_file_name{}; + std::string m_file_path; + std::string m_file_name; u64 m_file_size{}; u64 m_volume_size{}; - std::map m_short_names{}; - std::map m_long_names{}; - std::map m_short_makers{}; - std::map m_long_makers{}; - std::map m_descriptions{}; - std::string m_internal_name{}; - std::string m_game_id{}; - std::string m_gametdb_id{}; + std::map m_short_names; + std::map m_long_names; + std::map m_short_makers; + std::map m_long_makers; + std::map m_descriptions; + std::string m_internal_name; + std::string m_game_id; + std::string m_gametdb_id; u64 m_title_id{}; - std::string m_maker_id{}; + std::string m_maker_id; - DiscIO::Region m_region{}; - DiscIO::Country m_country{}; + DiscIO::Region m_region{DiscIO::Region::Unknown}; + DiscIO::Country m_country{DiscIO::Country::Unknown}; DiscIO::Platform m_platform{}; DiscIO::BlobType m_blob_type{}; u16 m_revision{}; u8 m_disc_number{}; - std::string m_apploader_date{}; + std::string m_apploader_date; GameBanner m_volume_banner{}; GameBanner m_custom_banner{};