diff options
author | Mattes D <github@xoft.cz> | 2023-05-11 22:05:17 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2023-05-16 23:50:37 +0200 |
commit | c9522fb740200ccef6230cec452c48efb31e5394 (patch) | |
tree | 7e74d70699e13dd0a92444a1a0add7a3059ac7ca /src/Enchantments.cpp | |
parent | Try a timeout for jobs. (diff) | |
download | cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.gz cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.bz2 cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.lz cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.xz cuberite-c9522fb740200ccef6230cec452c48efb31e5394.tar.zst cuberite-c9522fb740200ccef6230cec452c48efb31e5394.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Enchantments.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Enchantments.cpp b/src/Enchantments.cpp index 8abf4469d..fbe4c8b95 100644 --- a/src/Enchantments.cpp +++ b/src/Enchantments.cpp @@ -85,7 +85,7 @@ void cEnchantments::AddFromString(const AString & a_StringSpec) -size_t cEnchantments::Count(void) const +size_t cEnchantments::Count() const { return m_Enchantments.size(); } @@ -94,13 +94,13 @@ size_t cEnchantments::Count(void) const -AString cEnchantments::ToString(void) const +AString cEnchantments::ToString() const { // Serialize all the enchantments into a string AString res; for (cEnchantments::cMap::const_iterator itr = m_Enchantments.begin(), end = m_Enchantments.end(); itr != end; ++itr) { - AppendPrintf(res, "%d=%d;", itr->first, itr->second); + res.append(fmt::format(FMT_STRING("{}={};"), itr->first, itr->second)); } // for itr - m_Enchantments[] return res; } |