Skip to content

Commit

Permalink
Use fmt::runtime in FmtFormatT
Browse files Browse the repository at this point in the history
This format string is by definition dynamic and can't be checked at compile time.  There are other similar strings in the log handler and in asserts, but they use vformat and thus don't need fmt::runtime.  We might be able to do a similar thing where the untranslated string is compile-time checked, but FmtFormatT is used in so few places that I don't want to handle that in this PR.
  • Loading branch information
Pokechu22 committed Jan 13, 2022
1 parent 0cc211d commit cc592ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/Common/MsgHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void SetAbortOnPanicAlert(bool should_abort);
template <typename... Args>
std::string FmtFormatT(const char* string, Args&&... args)
{
return fmt::format(Common::GetStringT(string), std::forward<Args>(args)...);
return fmt::format(fmt::runtime(Common::GetStringT(string)), std::forward<Args>(args)...);
}
} // namespace Common

Expand Down

0 comments on commit cc592ab

Please sign in to comment.