Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/StarStatistics.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:23:44 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:23:44 +1000
commit332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (patch)
treefd9c441b796b522bdd5c7f8fbd32f51b8eff2a28 /source/game/StarStatistics.cpp
parent14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff)
The Formatting String Catastrophe
Diffstat (limited to 'source/game/StarStatistics.cpp')
-rw-r--r--source/game/StarStatistics.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/game/StarStatistics.cpp b/source/game/StarStatistics.cpp
index f4a1595..6582663 100644
--- a/source/game/StarStatistics.cpp
+++ b/source/game/StarStatistics.cpp
@@ -68,7 +68,7 @@ bool Statistics::reset() {
void Statistics::update() {
if (m_service) {
if (auto error = m_service->error()) {
- Logger::error("Statistics platform service error: %s", *error);
+ Logger::error("Statistics platform service error: {}", *error);
// Service failed. Continue with local stats and achievements only.
m_service = {};
m_initialized = true;
@@ -115,7 +115,7 @@ Json Statistics::Stat::toJson() const {
void Statistics::processEvent(String const& name, Json const& fields) {
if (m_service)
m_service->reportEvent(name, fields);
- Logger::debug("Event %s %s", name, fields);
+ Logger::debug("Event {} {}", name, fields);
auto statisticsDatabase = Root::singleton().statisticsDatabase();
if (auto const& event = statisticsDatabase->event(name)) {
@@ -124,7 +124,7 @@ void Statistics::processEvent(String const& name, Json const& fields) {
}
void Statistics::setStat(String const& name, String const& type, Json const& value) {
- Logger::debug("Stat %s (%s) : %s", name, type, value);
+ Logger::debug("Stat {} ({}) : {}", name, type, value);
m_stats[name] = Stat { type, value };
if (m_service)
m_service->setStat(name, type, value);
@@ -139,7 +139,7 @@ void Statistics::unlockAchievement(String const& name) {
m_achievements.add(name);
if (m_service)
m_service->unlockAchievement(name);
- Logger::debug("Achievement get %s", name);
+ Logger::debug("Achievement get {}", name);
}
bool Statistics::checkAchievement(String const& achievementName) {
@@ -166,7 +166,7 @@ void Statistics::readStatistics() {
}
} catch (std::exception const& e) {
- Logger::warn("Error loading local player statistics file, resetting: %s", outputException(e, false));
+ Logger::warn("Error loading local player statistics file, resetting: {}", outputException(e, false));
}
}