diff options
author | rubidium42 <rubidium@openttd.org> | 2021-06-12 21:33:01 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-06-13 15:25:31 +0200 |
commit | eb6cdadc4dad9de62abbd31c410050ae150935b1 (patch) | |
tree | 9abf6cf90bec474fcf226c15d6f85dbbbed04551 /src/framerate_gui.cpp | |
parent | d9c1d18f2bde32fe615fbe6ad088fbce1e2b82bf (diff) | |
download | openttd-eb6cdadc4dad9de62abbd31c410050ae150935b1.tar.xz |
Codechange: replace IConsolePrintF with IConsolePrint and fmt formatting
Also make some strings more consistent with the rest of the console strings.
Diffstat (limited to 'src/framerate_gui.cpp')
-rw-r--r-- | src/framerate_gui.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp index 917ab5692..107762936 100644 --- a/src/framerate_gui.cpp +++ b/src/framerate_gui.cpp @@ -1023,7 +1023,7 @@ void ConPrintFramerate() const int count2 = NUM_FRAMERATE_POINTS / 4; const int count3 = NUM_FRAMERATE_POINTS / 1; - IConsolePrintF(TC_SILVER, "Based on num. data points: %d %d %d", count1, count2, count3); + IConsolePrint(TC_SILVER, "Based on num. data points: {} {} {}", count1, count2, count3); static const char *MEASUREMENT_NAMES[PFE_MAX] = { "Game loop", @@ -1050,7 +1050,7 @@ void ConPrintFramerate() for (const PerformanceElement *e = rate_elements; e < rate_elements + lengthof(rate_elements); e++) { auto &pf = _pf_data[*e]; if (pf.num_valid == 0) continue; - IConsolePrintF(TC_GREEN, "%s rate: %.2ffps (expected: %.2ffps)", + IConsolePrint(TC_GREEN, "{} rate: {:.2f}fps (expected: {:.2f}fps)", MEASUREMENT_NAMES[*e], pf.GetRate(), pf.expected_rate); @@ -1067,7 +1067,7 @@ void ConPrintFramerate() seprintf(ai_name_buf, lastof(ai_name_buf), "AI %d %s", e - PFE_AI0 + 1, GetAIName(e - PFE_AI0)), name = ai_name_buf; } - IConsolePrintF(TC_LIGHT_BLUE, "%s times: %.2fms %.2fms %.2fms", + IConsolePrint(TC_LIGHT_BLUE, "{} times: {:.2f}ms {:.2f}ms {:.2f}ms", name, pf.GetAverageDurationMilliseconds(count1), pf.GetAverageDurationMilliseconds(count2), |