From 332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 27 Jun 2023 20:23:44 +1000 Subject: The Formatting String Catastrophe --- source/game/StarEntityFactory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/game/StarEntityFactory.cpp') 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(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(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)); } } -- cgit v1.2.3