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/StarWorldStorage.cpp | |
parent | 14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff) |
The Formatting String Catastrophe
Diffstat (limited to 'source/game/StarWorldStorage.cpp')
-rw-r--r-- | source/game/StarWorldStorage.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/game/StarWorldStorage.cpp b/source/game/StarWorldStorage.cpp index 395bffd..869a830 100644 --- a/source/game/StarWorldStorage.cpp +++ b/source/game/StarWorldStorage.cpp @@ -157,7 +157,7 @@ void WorldStorage::loadSector(Sector sector) { } catch (std::exception const& e) { m_db.rollback(); m_db.close(); - throw WorldStorageException(strf("Failed to load sector %s", sector), e); + throw WorldStorageException(strf("Failed to load sector {}", sector), e); } } @@ -168,7 +168,7 @@ void WorldStorage::activateSector(Sector sector) { } catch (std::exception const& e) { m_db.rollback(); m_db.close(); - throw WorldStorageException(strf("Failed to load sector %s", sector), e); + throw WorldStorageException(strf("Failed to load sector {}", sector), e); } } @@ -193,12 +193,12 @@ void WorldStorage::triggerTerraformSector(Sector sector) { p->generationLevel = SectorGenerationLevel::Terraform; } else { - throw WorldStorageException(strf("Couldn't flag sector %s for terraforming; metadata unavailable", sector)); + throw WorldStorageException(strf("Couldn't flag sector {} for terraforming; metadata unavailable", sector)); } } catch (std::exception const& e) { m_db.rollback(); m_db.close(); - throw WorldStorageException(strf("Failed to terraform sector %s", sector), e); + throw WorldStorageException(strf("Failed to terraform sector {}", sector), e); } } @@ -691,7 +691,7 @@ void WorldStorage::loadSectorToLevel(Sector const& sector, SectorLoadLevel targe try { addedEntities.append(entityFactory->loadVersionedEntity(entityStore)); } catch (std::exception const& e) { - Logger::warn("Failed to deserialize entity: %s", outputException(e, true)); + Logger::warn("Failed to deserialize entity: {}", outputException(e, true)); } } } |