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

summaryrefslogtreecommitdiff
path: root/source/game/StarTenantDatabase.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/StarTenantDatabase.cpp
parent14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff)
The Formatting String Catastrophe
Diffstat (limited to 'source/game/StarTenantDatabase.cpp')
-rw-r--r--source/game/StarTenantDatabase.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/StarTenantDatabase.cpp b/source/game/StarTenantDatabase.cpp
index 3397bd7..1cfa0c4 100644
--- a/source/game/StarTenantDatabase.cpp
+++ b/source/game/StarTenantDatabase.cpp
@@ -21,11 +21,11 @@ TenantDatabase::TenantDatabase() {
try {
String name = assets->json(file).getString("name");
if (m_paths.contains(name))
- Logger::error("Tenant %s defined twice, second time from %s", name, file);
+ Logger::error("Tenant {} defined twice, second time from {}", name, file);
else
m_paths[name] = file;
} catch (std::exception const& e) {
- Logger::error("Error loading tenant file %s: %s", file, outputException(e, true));
+ Logger::error("Error loading tenant file {}: {}", file, outputException(e, true));
}
}
}
@@ -41,7 +41,7 @@ TenantPtr TenantDatabase::getTenant(String const& name) const {
[this](String const& name) -> TenantPtr {
if (auto path = m_paths.maybe(name))
return readTenant(*path);
- throw TenantException::format("No such tenant named '%s'", name);
+ throw TenantException::format("No such tenant named '{}'", name);
});
}
@@ -96,7 +96,7 @@ TenantPtr TenantDatabase::readTenant(String const& path) {
return make_shared<Tenant>(Tenant{name, priority, colonyTagCriteria, tenants, rent, config});
} catch (std::exception const& e) {
- throw TenantException::format("Error loading tenant '%s': %s", path, outputException(e, false));
+ throw TenantException::format("Error loading tenant '{}': {}", path, outputException(e, false));
}
}