From c9522fb740200ccef6230cec452c48efb31e5394 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Thu, 11 May 2023 22:05:17 +0200 Subject: Removed all Printf-family functions from StringUtils. Replaced them with fmt::format calls, including changes to the format strings. Also changed the format strings to use FMT_STRING, so that the format is checked compile-time against the arguments. Also fixed code-style violations already present in the code. --- src/WorldStorage/ScoreboardSerializer.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/WorldStorage/ScoreboardSerializer.cpp') diff --git a/src/WorldStorage/ScoreboardSerializer.cpp b/src/WorldStorage/ScoreboardSerializer.cpp index 5e644aab9..e6e639bcb 100644 --- a/src/WorldStorage/ScoreboardSerializer.cpp +++ b/src/WorldStorage/ScoreboardSerializer.cpp @@ -16,11 +16,8 @@ cScoreboardSerializer::cScoreboardSerializer(const AString & a_WorldName, cScoreboard * a_ScoreBoard): m_ScoreBoard(a_ScoreBoard) { - AString DataPath; - Printf(DataPath, "%s%cdata", a_WorldName.c_str(), cFile::PathSeparator()); - + auto DataPath = fmt::format(FMT_STRING("{}{}data"), a_WorldName, cFile::PathSeparator()); m_Path = DataPath + cFile::PathSeparator() + "scoreboard.dat"; - cFile::CreateFolder(DataPath); } @@ -28,7 +25,7 @@ cScoreboardSerializer::cScoreboardSerializer(const AString & a_WorldName, cScore -bool cScoreboardSerializer::Load(void) +bool cScoreboardSerializer::Load() { try { -- cgit v1.2.3