diff options
Diffstat (limited to 'src/BlockType.cpp')
-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); } |