summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage/FireworksSerializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/WorldStorage/FireworksSerializer.cpp')
-rw-r--r--src/WorldStorage/FireworksSerializer.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/WorldStorage/FireworksSerializer.cpp b/src/WorldStorage/FireworksSerializer.cpp
index fa411b4e9..f0fe7e48e 100644
--- a/src/WorldStorage/FireworksSerializer.cpp
+++ b/src/WorldStorage/FireworksSerializer.cpp
@@ -165,12 +165,10 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB
AString cFireworkItem::ColoursToString(const cFireworkItem & a_FireworkItem)
{
AString Result;
-
- for (std::vector<int>::const_iterator itr = a_FireworkItem.m_Colours.begin(); itr != a_FireworkItem.m_Colours.end(); ++itr)
+ for (const auto col: a_FireworkItem.m_Colours)
{
- AppendPrintf(Result, "%i;", *itr);
+ Result.append(fmt::format(FMT_STRING("{};"), col));
}
-
return Result;
}
@@ -200,12 +198,10 @@ void cFireworkItem::ColoursFromString(const AString & a_String, cFireworkItem &
AString cFireworkItem::FadeColoursToString(const cFireworkItem & a_FireworkItem)
{
AString Result;
-
- for (std::vector<int>::const_iterator itr = a_FireworkItem.m_FadeColours.begin(); itr != a_FireworkItem.m_FadeColours.end(); ++itr)
+ for (const auto col: a_FireworkItem.m_FadeColours)
{
- AppendPrintf(Result, "%i;", *itr);
+ Result.append(fmt::format(FMT_STRING("{};"), col));
}
-
return Result;
}