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

summaryrefslogtreecommitdiff
path: root/source/game/StarTechDatabase.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/StarTechDatabase.cpp
parent14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff)
The Formatting String Catastrophe
Diffstat (limited to 'source/game/StarTechDatabase.cpp')
-rw-r--r--source/game/StarTechDatabase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/game/StarTechDatabase.cpp b/source/game/StarTechDatabase.cpp
index ae8defa..a1cce3e 100644
--- a/source/game/StarTechDatabase.cpp
+++ b/source/game/StarTechDatabase.cpp
@@ -19,7 +19,7 @@ TechDatabase::TechDatabase() {
auto tech = parseTech(assets->json(file), file);
if (m_tech.contains(tech.name))
- throw TechDatabaseException::format("Duplicate tech named '%s', config file '%s'", tech.name, file);
+ throw TechDatabaseException::format("Duplicate tech named '{}', config file '{}'", tech.name, file);
m_tech[tech.name] = tech;
}
}
@@ -31,7 +31,7 @@ bool TechDatabase::contains(String const& techName) const {
TechConfig TechDatabase::tech(String const& techName) const {
if (auto p = m_tech.ptr(techName))
return *p;
- throw TechDatabaseException::format("No such tech '%s'", techName);
+ throw TechDatabaseException::format("No such tech '{}'", techName);
}
TechConfig TechDatabase::parseTech(Json const& config, String const& path) const {
@@ -55,7 +55,7 @@ TechConfig TechDatabase::parseTech(Json const& config, String const& path) const
return tech;
} catch (std::exception const& e) {
- throw TechDatabaseException(strf("Error reading tech config %s", path), e);
+ throw TechDatabaseException(strf("Error reading tech config {}", path), e);
}
}