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

summaryrefslogtreecommitdiff
path: root/source/game/StarVehicleDatabase.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/StarVehicleDatabase.cpp
parent14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff)
The Formatting String Catastrophe
Diffstat (limited to 'source/game/StarVehicleDatabase.cpp')
-rw-r--r--source/game/StarVehicleDatabase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/game/StarVehicleDatabase.cpp b/source/game/StarVehicleDatabase.cpp
index cb1a302..4c22963 100644
--- a/source/game/StarVehicleDatabase.cpp
+++ b/source/game/StarVehicleDatabase.cpp
@@ -16,11 +16,11 @@ VehicleDatabase::VehicleDatabase() {
String name = config.getString("name");
if (m_vehicles.contains(name))
- throw VehicleDatabaseException::format("Repeat vehicle name '%s'", name);
+ throw VehicleDatabaseException::format("Repeat vehicle name '{}'", name);
m_vehicles.add(move(name), make_pair(move(file), move(config)));
} catch (StarException const& e) {
- throw VehicleDatabaseException(strf("Error loading vehicle '%s'", file), e);
+ throw VehicleDatabaseException(strf("Error loading vehicle '{}'", file), e);
}
}
}
@@ -28,7 +28,7 @@ VehicleDatabase::VehicleDatabase() {
VehiclePtr VehicleDatabase::create(String const& vehicleName, Json const& extraConfig) const {
auto configPair = m_vehicles.ptr(vehicleName);
if (!configPair)
- throw VehicleDatabaseException::format("No such vehicle named '%s'", vehicleName);
+ throw VehicleDatabaseException::format("No such vehicle named '{}'", vehicleName);
return make_shared<Vehicle>(configPair->second, configPair->first, extraConfig);
}