Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/utility/generation_benchmark.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:23:44 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-06-27 20:23:44 +1000
commit332983c97b7a729c4dc5f19aa9ee4a22c420f7d8 (patch)
treefd9c441b796b522bdd5c7f8fbd32f51b8eff2a28 /source/utility/generation_benchmark.cpp
parent14b9689b6d4f4ad5276c88130dc6e449bedc0709 (diff)
The Formatting String Catastrophe
Diffstat (limited to 'source/utility/generation_benchmark.cpp')
-rw-r--r--source/utility/generation_benchmark.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/utility/generation_benchmark.cpp b/source/utility/generation_benchmark.cpp
index f3f2f97..8e1631c 100644
--- a/source/utility/generation_benchmark.cpp
+++ b/source/utility/generation_benchmark.cpp
@@ -44,7 +44,7 @@ int main(int argc, char** argv) {
if (auto reportEveryOption = options.parameters.maybe("reportevery"))
reportEvery = lexicalCast<unsigned>(reportEveryOption->first());
- coutf("testing generation on coordinate %s\n", coordinate);
+ coutf("testing generation on coordinate {}\n", coordinate);
auto worldParameters = celestialDatabase.parameters(coordinate).take();
auto worldTemplate = make_shared<WorldTemplate>(worldParameters.visitableParameters(), SkyParameters(), worldParameters.seed());
@@ -57,25 +57,25 @@ int main(int argc, char** argv) {
double start = Time::monotonicTime();
double lastReport = Time::monotonicTime();
- coutf("Starting world generation for %s regions\n", regionsToGenerate);
+ coutf("Starting world generation for {} regions\n", regionsToGenerate);
for (unsigned i = 0; i < regionsToGenerate; ++i) {
if (i != 0 && i % reportEvery == 0) {
float gps = reportEvery / (Time::monotonicTime() - lastReport);
lastReport = Time::monotonicTime();
- coutf("[%s] %ss | Generatons Per Second: %s\n", i, Time::monotonicTime() - start, gps);
+ coutf("[{}] {}s | Generatons Per Second: {}\n", i, Time::monotonicTime() - start, gps);
}
RectI region = RectI::withCenter(Vec2I(rand.randInt(0, worldSize[0]), rand.randInt(0, worldSize[1])), Vec2I::filled(regionSize));
worldServer.generateRegion(region);
}
- coutf("Finished generating %s regions with size %sx%s in world '%s' in %s seconds", regionsToGenerate, regionSize, regionSize, coordinate, Time::monotonicTime() - start);
+ coutf("Finished generating {} regions with size {}x{} in world '{}' in {} seconds", regionsToGenerate, regionSize, regionSize, coordinate, Time::monotonicTime() - start);
return 0;
} catch (std::exception const& e) {
- cerrf("Exception caught: %s\n", outputException(e, true));
+ cerrf("Exception caught: {}\n", outputException(e, true));
return 1;
}
}