From 5250cb36964515774ff49a7a2fff83ca855c247a Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 18 Sep 2018 21:46:42 +0100 Subject: [PATCH] Rename LootVersion::string() to LootVersion::GetVersionString() For consistency with the naming of other API methods. --- include/loot/loot_version.h | 2 +- src/api/loot_version.cpp.in | 2 +- src/tests/api/internals/helpers/version_test.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/loot/loot_version.h b/include/loot/loot_version.h index ad45c6ab..a151721b 100644 --- a/include/loot/loot_version.h +++ b/include/loot/loot_version.h @@ -52,7 +52,7 @@ public: * @brief Get the API version as a string. * @return A string of the form "major.minor.patch". */ - LOOT_API static std::string string(); + LOOT_API static std::string GetVersionString(); }; } diff --git a/src/api/loot_version.cpp.in b/src/api/loot_version.cpp.in index 51e132aa..5c703b07 100644 --- a/src/api/loot_version.cpp.in +++ b/src/api/loot_version.cpp.in @@ -30,7 +30,7 @@ const unsigned int LootVersion::minor = 13; const unsigned int LootVersion::patch = 8; const std::string LootVersion::revision = "@GIT_COMMIT_STRING@"; -LOOT_API std::string LootVersion::string() { +LOOT_API std::string LootVersion::GetVersionString() { return std::to_string(major) + '.' + std::to_string(minor) + '.' + std::to_string(patch); } } diff --git a/src/tests/api/internals/helpers/version_test.h b/src/tests/api/internals/helpers/version_test.h index 7bb37125..9a8bc994 100644 --- a/src/tests/api/internals/helpers/version_test.h +++ b/src/tests/api/internals/helpers/version_test.h @@ -55,14 +55,14 @@ INSTANTIATE_TEST_CASE_P(, VersionTest, ::testing::Values(GameType::tes5)); TEST_P(VersionTest, shouldExtractVersionFromNonAsciiDll) { Version version(dataPath / std::filesystem::u8path(nonAsciiDll)); - std::string expected(LootVersion::string() + ".0"); + std::string expected(LootVersion::GetVersionString() + ".0"); EXPECT_EQ(expected, version.AsString()); } TEST(Version, shouldExtractVersionFromApiDll) { // Use the API DLL built. Version version(std::filesystem::path("loot_api.dll")); - std::string expected(LootVersion::string() + ".0"); + std::string expected(LootVersion::GetVersionString() + ".0"); EXPECT_EQ(expected, version.AsString()); } #endif