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/BlockType.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/BlockType.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/BlockType.cpp b/src/BlockType.cpp index 63e2a2a24..40bb00f95 100644 --- a/src/BlockType.cpp +++ b/src/BlockType.cpp @@ -138,11 +138,11 @@ public: AString res; if (a_ItemDamage == -1) { - Printf(res, "%d", a_ItemType); + res = fmt::format(FMT_STRING("{}"), a_ItemType); } else { - Printf(res, "%d:%d", a_ItemType, a_ItemDamage); + res = fmt::format(FMT_STRING("{}:{}"), a_ItemType, a_ItemDamage); } return res; } @@ -260,9 +260,7 @@ AString ItemTypeToString(short a_ItemType) AString ItemToFullString(const cItem & a_Item) { - AString res; - Printf(res, "%s:%d * %d", ItemToString(a_Item).c_str(), a_Item.m_ItemDamage, a_Item.m_ItemCount); - return res; + return fmt::format(FMT_STRING("{}:{} * {}"), ItemToString(a_Item), a_Item.m_ItemDamage, a_Item.m_ItemCount); } |