Codechange: use fmt::format instead of printf for the NewGRF profiler

This commit is contained in:
Rubidium
2023-04-19 21:38:09 +02:00
committed by rubidium42
parent 3105d0b09e
commit 630d3bc053
2 changed files with 10 additions and 17 deletions

View File

@@ -111,7 +111,7 @@ uint32 NewGRFProfiler::Finish()
fputs("Tick,Sprite,Feature,Item,CallbackID,Microseconds,Depth,Result\n", f);
for (const Call &c : this->calls) {
fprintf(f, OTTD_PRINTF64U ",%u,0x%X,%u,0x%X,%u,%u,%u\n", c.tick, c.root_sprite, c.feat, c.item, (uint)c.cb, c.time, c.subs, c.result);
fputs(fmt::format("{},{},{:#X},{},{:#X},{},{},{}\n", c.tick, c.root_sprite, c.feat, c.item, (uint)c.cb, c.time, c.subs, c.result).c_str(), f);
total_microseconds += c.time;
}