From ad547d2d6ccc1350c91c1a518b71985771a01dfa Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Tue, 25 Mar 2025 23:42:27 +0100 Subject: [PATCH] Rename static constants of repositories --- src/openrct2/object/ObjectRepository.cpp | 8 ++++---- src/openrct2/ride/TrackDesignRepository.cpp | 8 ++++---- src/openrct2/scenario/ScenarioRepository.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/openrct2/object/ObjectRepository.cpp b/src/openrct2/object/ObjectRepository.cpp index 6ddfdfacff..e12322a095 100644 --- a/src/openrct2/object/ObjectRepository.cpp +++ b/src/openrct2/object/ObjectRepository.cpp @@ -75,16 +75,16 @@ using ObjectEntryMap = std::unordered_map { private: - static constexpr uint32_t MAGIC_NUMBER = 0x5844494F; // OIDX - static constexpr uint16_t VERSION = 31; - static constexpr auto PATTERN = "*.dat;*.pob;*.json;*.parkobj"; + static constexpr uint32_t kMagicNumber = 0x5844494F; // OIDX + static constexpr uint16_t kVersion = 31; + static constexpr auto kPattern = "*.dat;*.pob;*.json;*.parkobj"; IObjectRepository& _objectRepository; public: explicit ObjectFileIndex(IObjectRepository& objectRepository, const IPlatformEnvironment& env) : FileIndex( - "object index", MAGIC_NUMBER, VERSION, env.GetFilePath(PATHID::CACHE_OBJECTS), std::string(PATTERN), + "object index", kMagicNumber, kVersion, env.GetFilePath(PATHID::CACHE_OBJECTS), std::string(kPattern), std::vector{ env.GetDirectoryPath(DirBase::openrct2, DirId::objects), env.GetDirectoryPath(DirBase::user, DirId::objects), diff --git a/src/openrct2/ride/TrackDesignRepository.cpp b/src/openrct2/ride/TrackDesignRepository.cpp index 98dcfa3205..332c0bf7b3 100644 --- a/src/openrct2/ride/TrackDesignRepository.cpp +++ b/src/openrct2/ride/TrackDesignRepository.cpp @@ -53,14 +53,14 @@ std::string GetNameFromTrackPath(const std::string& path) class TrackDesignFileIndex final : public FileIndex { private: - static constexpr uint32_t MAGIC_NUMBER = 0x58444954; // TIDX - static constexpr uint16_t VERSION = 5; - static constexpr auto PATTERN = "*.td4;*.td6"; + static constexpr uint32_t kMagicNumber = 0x58444954; // TIDX + static constexpr uint16_t kVersion = 5; + static constexpr auto kPattern = "*.td4;*.td6"; public: explicit TrackDesignFileIndex(const IPlatformEnvironment& env) : FileIndex( - "track design index", MAGIC_NUMBER, VERSION, env.GetFilePath(PATHID::CACHE_TRACKS), std::string(PATTERN), + "track design index", kMagicNumber, kVersion, env.GetFilePath(PATHID::CACHE_TRACKS), std::string(kPattern), std::vector({ env.GetDirectoryPath(DirBase::rct1, DirId::trackDesigns), env.GetDirectoryPath(DirBase::rct2, DirId::trackDesigns), diff --git a/src/openrct2/scenario/ScenarioRepository.cpp b/src/openrct2/scenario/ScenarioRepository.cpp index 66a11c5ec3..1dece4a764 100644 --- a/src/openrct2/scenario/ScenarioRepository.cpp +++ b/src/openrct2/scenario/ScenarioRepository.cpp @@ -123,14 +123,14 @@ static void ScenarioHighscoreFree(ScenarioHighscoreEntry* highscore) class ScenarioFileIndex final : public FileIndex { private: - static constexpr uint32_t MAGIC_NUMBER = 0x58444953; // SIDX - static constexpr uint16_t VERSION = 9; - static constexpr auto PATTERN = "*.sc4;*.sc6;*.sea;*.park"; + static constexpr uint32_t kMagicNumber = 0x58444953; // SIDX + static constexpr uint16_t kVersion = 9; + static constexpr auto kPattern = "*.sc4;*.sc6;*.sea;*.park"; public: explicit ScenarioFileIndex(const IPlatformEnvironment& env) : FileIndex( - "scenario index", MAGIC_NUMBER, VERSION, env.GetFilePath(PATHID::CACHE_SCENARIOS), std::string(PATTERN), + "scenario index", kMagicNumber, kVersion, env.GetFilePath(PATHID::CACHE_SCENARIOS), std::string(kPattern), std::vector({ env.GetDirectoryPath(DirBase::rct1, DirId::scenarios), env.GetDirectoryPath(DirBase::rct2, DirId::scenarios),