From 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 27 Jun 2023 20:23:44 +1000 Subject: The Formatting String Catastrophe --- source/game/StarStatisticsDatabase.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/game/StarStatisticsDatabase.cpp') diff --git a/source/game/StarStatisticsDatabase.cpp b/source/game/StarStatisticsDatabase.cpp index 7a21ef2..d3b993e 100644 --- a/source/game/StarStatisticsDatabase.cpp +++ b/source/game/StarStatisticsDatabase.cpp @@ -15,11 +15,11 @@ StatisticsDatabase::StatisticsDatabase() : m_cacheMutex(), m_eventCache() { try { String name = assets->json(file).getString("eventName"); if (m_eventPaths.contains(name)) - Logger::error("Event %s defined twice, second time from %s", name, file); + Logger::error("Event {} defined twice, second time from {}", name, file); else m_eventPaths[name] = file; } catch (std::exception const& e) { - Logger::error("Error loading event file %s: %s", file, outputException(e, true)); + Logger::error("Error loading event file {}: {}", file, outputException(e, true)); } } @@ -28,7 +28,7 @@ StatisticsDatabase::StatisticsDatabase() : m_cacheMutex(), m_eventCache() { Json achievement = assets->json(file); String name = achievement.getString("name"); if (m_achievementPaths.contains(name)) - Logger::error("Achievement %s defined twice, second time from %s", name, file); + Logger::error("Achievement {} defined twice, second time from {}", name, file); else m_achievementPaths[name] = file; @@ -36,7 +36,7 @@ StatisticsDatabase::StatisticsDatabase() : m_cacheMutex(), m_eventCache() { m_statAchievements[stat.toString()].append(name); } } catch (std::exception const& e) { - Logger::error("Error loading achievement file %s: %s", file, outputException(e, true)); + Logger::error("Error loading achievement file {}: {}", file, outputException(e, true)); } } } -- cgit v1.2.3