From b4470ad4c215aad3765eb6acfc739548fdc53064 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 28 May 2019 07:18:10 -0400 Subject: [PATCH] UICommon/GameFile: Make COVER_URL a plain C string Same behavior but doesn't take up 8 bytes in the executable to store a pointer. While we're at it, move it into an anonymous namespace within the UICommon namespace. --- Source/Core/UICommon/GameFile.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp index 87a390a1e1..4e5ad6f9c2 100644 --- a/Source/Core/UICommon/GameFile.cpp +++ b/Source/Core/UICommon/GameFile.cpp @@ -39,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. @@ -55,6 +57,7 @@ static bool UseGameCovers() return Config::Get(Config::MAIN_USE_GAME_COVERS); #endif } +} // Anonymous namespace DiscIO::Language GameFile::GetConfigLanguage() const {