From f0578bb93228ffd29dd5818b654cd8d9ae2f8f00 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 16 Feb 2020 00:14:25 +0900 Subject: [PATCH] HostInterface: Make helper methods const --- src/core/host_interface.cpp | 10 +++++----- src/core/host_interface.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index bf639cd6d..2740752bf 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -543,7 +543,7 @@ std::string HostInterface::GetGameListDatabaseFileName() const return GetUserDirectoryRelativePath("cache/redump.dat"); } -std::string HostInterface::GetGameSaveStateFileName(const char* game_code, s32 slot) +std::string HostInterface::GetGameSaveStateFileName(const char* game_code, s32 slot) const { if (slot < 0) return GetUserDirectoryRelativePath("savestates/%s_resume.sav", game_code); @@ -551,7 +551,7 @@ std::string HostInterface::GetGameSaveStateFileName(const char* game_code, s32 s return GetUserDirectoryRelativePath("savestates/%s_%d.sav", game_code, slot); } -std::string HostInterface::GetGlobalSaveStateFileName(s32 slot) +std::string HostInterface::GetGlobalSaveStateFileName(s32 slot) const { if (slot < 0) return GetUserDirectoryRelativePath("savestates/resume.sav"); @@ -559,17 +559,17 @@ std::string HostInterface::GetGlobalSaveStateFileName(s32 slot) return GetUserDirectoryRelativePath("savestates/savestate_%d.sav", slot); } -std::string HostInterface::GetSharedMemoryCardPath(u32 slot) +std::string HostInterface::GetSharedMemoryCardPath(u32 slot) const { return GetUserDirectoryRelativePath("memcards/shared_card_%d.mcd", slot + 1); } -std::string HostInterface::GetGameMemoryCardPath(const char* game_code, u32 slot) +std::string HostInterface::GetGameMemoryCardPath(const char* game_code, u32 slot) const { return GetUserDirectoryRelativePath("memcards/game_card_%s_%d.mcd", game_code, slot + 1); } -std::vector HostInterface::GetAvailableSaveStates(const char* game_code) +std::vector HostInterface::GetAvailableSaveStates(const char* game_code) const { std::vector si; std::string path; diff --git a/src/core/host_interface.h b/src/core/host_interface.h index 31ba27a76..c3d551111 100644 --- a/src/core/host_interface.h +++ b/src/core/host_interface.h @@ -108,19 +108,19 @@ protected: std::string GetGameListDatabaseFileName() const; /// Returns the path to a save state file. Specifying an index of -1 is the "resume" save state. - std::string GetGameSaveStateFileName(const char* game_code, s32 slot); + std::string GetGameSaveStateFileName(const char* game_code, s32 slot) const; /// Returns the path to a save state file. Specifying an index of -1 is the "resume" save state. - std::string GetGlobalSaveStateFileName(s32 slot); + std::string GetGlobalSaveStateFileName(s32 slot) const; /// Returns the default path to a memory card. - std::string GetSharedMemoryCardPath(u32 slot); + std::string GetSharedMemoryCardPath(u32 slot) const; /// Returns the default path to a memory card for a specific game. - std::string GetGameMemoryCardPath(const char* game_code, u32 slot); + std::string GetGameMemoryCardPath(const char* game_code, u32 slot) const; /// Returns a list of save states for the specified game code. - std::vector GetAvailableSaveStates(const char* game_code); + std::vector GetAvailableSaveStates(const char* game_code) const; /// Loads the current emulation state from file. Specifying a slot of -1 loads the "resume" game state. bool LoadState(bool global, u32 slot);