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/StarEntityMap.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/game/StarEntityMap.cpp') diff --git a/source/game/StarEntityMap.cpp b/source/game/StarEntityMap.cpp index c04f0d5..a3844dc 100644 --- a/source/game/StarEntityMap.cpp +++ b/source/game/StarEntityMap.cpp @@ -34,10 +34,10 @@ void EntityMap::addEntity(EntityPtr entity) { auto uniqueId = entity->uniqueId(); if (m_spatialMap.contains(entityId)) - throw EntityMapException::format("Duplicate entity id '%s' in EntityMap::addEntity", entityId); + throw EntityMapException::format("Duplicate entity id '{}' in EntityMap::addEntity", entityId); if (boundBox.isNegative() || boundBox.width() > MaximumEntityBoundBox || boundBox.height() > MaximumEntityBoundBox) { - throw EntityMapException::format("Entity id: %s type: %s bound box is negative or beyond the maximum entity bound box size in EntityMap::addEntity", + throw EntityMapException::format("Entity id: {} type: {} bound box is negative or beyond the maximum entity bound box size in EntityMap::addEntity", entity->entityId(), (int)entity->entityType()); } @@ -45,7 +45,7 @@ void EntityMap::addEntity(EntityPtr entity) { throw EntityMapException::format("Null entity id in EntityMap::addEntity"); if (uniqueId && m_uniqueMap.hasLeftValue(*uniqueId)) - throw EntityMapException::format("Duplicate entity unique id (%s) on entity id (%s) in EntityMap::addEntity", *uniqueId, entityId); + throw EntityMapException::format("Duplicate entity unique id ({}) on entity id ({}) in EntityMap::addEntity", *uniqueId, entityId); m_spatialMap.set(entityId, m_geometry.splitRect(boundBox, position), move(entity)); if (uniqueId) @@ -76,7 +76,7 @@ void EntityMap::updateAllEntities(EntityCallback const& callback, functionmetaBoundBox(); if (boundBox.isNegative() || boundBox.width() > MaximumEntityBoundBox || boundBox.height() > MaximumEntityBoundBox) { - throw EntityMapException::format("Entity id: %s type: %s bound box is negative or beyond the maximum entity bound box size in EntityMap::addEntity", + throw EntityMapException::format("Entity id: {} type: {} bound box is negative or beyond the maximum entity bound box size in EntityMap::addEntity", entity->entityId(), (int)entity->entityType()); } @@ -92,7 +92,7 @@ void EntityMap::updateAllEntities(EntityCallback const& callback, function