diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 20:23:44 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-27 20:23:44 +1000 |
commit | 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (patch) | |
tree | fd9c441b796b522bdd5c7f8fbd32f51b8eff2a28 /source/game/StarEntityFactory.cpp | |
parent | 14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff) |
The Formatting String Catastrophe
Diffstat (limited to 'source/game/StarEntityFactory.cpp')
-rw-r--r-- | source/game/StarEntityFactory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/game/StarEntityFactory.cpp b/source/game/StarEntityFactory.cpp index cfab917..333dec1 100644 --- a/source/game/StarEntityFactory.cpp +++ b/source/game/StarEntityFactory.cpp @@ -64,7 +64,7 @@ ByteArray EntityFactory::netStoreEntity(EntityPtr const& entity) const { } else if (auto vehicle = as<Vehicle>(entity)) { return m_vehicleDatabase->netStore(vehicle); } else { - throw EntityFactoryException::format("Don't know how to make net store for entity type '%s'", EntityTypeNames.getRight(entity->entityType())); + throw EntityFactoryException::format("Don't know how to make net store for entity type '{}'", EntityTypeNames.getRight(entity->entityType())); } } @@ -92,7 +92,7 @@ EntityPtr EntityFactory::netLoadEntity(EntityType type, ByteArray const& netStor } else if (type == EntityType::Vehicle) { return m_vehicleDatabase->netLoad(netStore); } else { - throw EntityFactoryException::format("Don't know how to create entity type '%s' from net store", EntityTypeNames.getRight(type)); + throw EntityFactoryException::format("Don't know how to create entity type '{}' from net store", EntityTypeNames.getRight(type)); } } @@ -116,7 +116,7 @@ Json EntityFactory::diskStoreEntity(EntityPtr const& entity) const { } else if (auto vehicle = as<Vehicle>(entity)) { return m_vehicleDatabase->diskStore(vehicle); } else { - throw EntityFactoryException::format("Don't know how to make disk store for entity type '%s'", EntityTypeNames.getRight(entity->entityType())); + throw EntityFactoryException::format("Don't know how to make disk store for entity type '{}'", EntityTypeNames.getRight(entity->entityType())); } } @@ -140,7 +140,7 @@ EntityPtr EntityFactory::diskLoadEntity(EntityType type, Json const& diskStore) } else if (type == EntityType::Vehicle) { return m_vehicleDatabase->diskLoad(diskStore); } else { - throw EntityFactoryException::format("Don't know how to create entity type '%s' from disk store", EntityTypeNames.getRight(type)); + throw EntityFactoryException::format("Don't know how to create entity type '{}' from disk store", EntityTypeNames.getRight(type)); } } |