Codechange: minor bits and pieces related to fmt::format() (#11806)

- Don't make run-time formatting what can be done compile-time.
- Be explicit about run-time formatting.
- Fix datetime printing.
This commit is contained in:
Patric Stout
2024-01-16 22:10:34 +01:00
committed by GitHub
parent 0b7410d979
commit 6550682b49
4 changed files with 8 additions and 4 deletions

View File

@@ -131,7 +131,7 @@ void NewGRFProfiler::Abort()
*/
std::string NewGRFProfiler::GetOutputFilename() const
{
return fmt::format("{}grfprofile-{%Y%m%d-%H%M}-{:08X}.csv", FiosGetScreenshotDir(), fmt::localtime(time(nullptr)), BSWAP32(this->grffile->grfid));
return fmt::format("{}grfprofile-{:%Y%m%d-%H%M}-{:08X}.csv", FiosGetScreenshotDir(), fmt::localtime(time(nullptr)), BSWAP32(this->grffile->grfid));
}
/* static */ uint32_t NewGRFProfiler::FinishAll()