Misc: Replace log printf calls with fmt

This commit is contained in:
Stenzek
2024-05-23 20:20:16 +10:00
parent 49b2e76dea
commit b6d019db66
117 changed files with 1585 additions and 1615 deletions

View File

@ -110,15 +110,15 @@ bool CDImageCueSheet::OpenAndParse(const char* filename, Error* error)
track_fp = FileSystem::OpenCFile(alternative_filename.c_str(), "rb");
if (track_fp)
{
Log_WarningPrintf("Your cue sheet references an invalid file '%s', but this was found at '%s' instead.",
track_filename.c_str(), alternative_filename.c_str());
Log_WarningFmt("Your cue sheet references an invalid file '{}', but this was found at '{}' instead.",
track_filename, alternative_filename);
}
}
if (!track_fp)
{
Log_ErrorPrintf("Failed to open track filename '%s' (from '%s' and '%s'): %s", track_full_filename.c_str(),
track_filename.c_str(), filename, track_error.GetDescription().c_str());
Log_ErrorFmt("Failed to open track filename '{}' (from '{}' and '{}'): {}", track_full_filename, track_filename,
filename, track_error.GetDescription());
Error::SetStringFmt(error, "Failed to open track filename '{}' (from '{}' and '{}'): {}", track_full_filename,
track_filename, Path::GetFileName(filename), track_error.GetDescription());
return false;
@ -149,8 +149,8 @@ bool CDImageCueSheet::OpenAndParse(const char* filename, Error* error)
file_size /= track_sector_size;
if (track_start >= file_size)
{
Log_ErrorPrintf("Failed to open track %u in '%s': track start is out of range (%u vs %" PRIu64 ")", track_num,
filename, track_start, file_size);
Log_ErrorFmt("Failed to open track {} in '{}': track start is out of range ({} vs {})", track_num, filename,
track_start, file_size);
Error::SetStringFmt(error, "Failed to open track {} in '{}': track start is out of range ({} vs {}))",
track_num, Path::GetFileName(filename), track_start, file_size);
return false;
@ -285,7 +285,7 @@ bool CDImageCueSheet::OpenAndParse(const char* filename, Error* error)
if (m_tracks.empty())
{
Log_ErrorPrintf("File '%s' contains no tracks", filename);
Log_ErrorFmt("File '{}' contains no tracks", filename);
Error::SetStringFmt(error, "File '{}' contains no tracks", Path::GetFileName(filename));
return false;
}