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/utility/world_benchmark.cpp | |
parent | 14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff) |
The Formatting String Catastrophe
Diffstat (limited to 'source/utility/world_benchmark.cpp')
-rw-r--r-- | source/utility/world_benchmark.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/utility/world_benchmark.cpp b/source/utility/world_benchmark.cpp index d9efe45..40476a1 100644 --- a/source/utility/world_benchmark.cpp +++ b/source/utility/world_benchmark.cpp @@ -63,7 +63,7 @@ int main(int argc, char** argv) { for (uint64_t i = 0; i < times; ++i) { WorldServer worldServer(worldTemplate, File::ephemeralFile()); - coutf("Starting world simulation for %s steps\n", steps); + coutf("Starting world simulation for {} steps\n", steps); double start = Time::monotonicTime(); double lastReport = Time::monotonicTime(); uint64_t entityCount = 0; @@ -79,23 +79,23 @@ int main(int argc, char** argv) { if (reportEvery != 0 && j % reportEvery == 0) { float fps = reportEvery / (Time::monotonicTime() - lastReport); lastReport = Time::monotonicTime(); - coutf("[%s] %ss | FPS: %s | Entities: %s\n", j, Time::monotonicTime() - start, fps, entityCount); + coutf("[{}] {}s | FPS: {} | Entities: {}\n", j, Time::monotonicTime() - start, fps, entityCount); } worldServer.update(); } double totalTime = Time::monotonicTime() - start; - coutf("Finished run of running dungeon world '%s' with seed %s for %s steps in %s seconds, average FPS: %s\n", + coutf("Finished run of running dungeon world '{}' with seed {} for {} steps in {} seconds, average FPS: {}\n", dungeon, worldSeed, steps, totalTime, steps / totalTime); sumTime += totalTime; } if (times != 1) { - coutf("Average of all runs - time: %s, FPS: %s\n", sumTime / times, steps / (sumTime / times)); + coutf("Average of all runs - time: {}, FPS: {}\n", sumTime / times, steps / (sumTime / times)); } return 0; } catch (std::exception const& e) { - cerrf("Exception caught: %s\n", outputException(e, true)); + cerrf("Exception caught: {}\n", outputException(e, true)); return 1; } } |