diff options
| author | LC <mathew1800@gmail.com> | 2020-10-19 09:18:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-19 09:18:16 -0400 |
| commit | 0f5bf90013cd1358b3ccb2f22c09748e40a552f4 (patch) | |
| tree | f4fedfa6c797161388822c4b2d62235a9da4781b /Source/Core/Common | |
| parent | c9b2fbb64b94c6b79958f5d69af8e7c891794a39 (diff) | |
| parent | cb14b65aad860a79f949fa1e6986cffeba5e3509 (diff) | |
Merge pull request #9150 from JosJuice/discio-fmt
DiscIO: Make use of fmt where applicable
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/MsgHandler.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/Common/MsgHandler.h b/Source/Core/Common/MsgHandler.h index aadef05ea7..737640361c 100644 --- a/Source/Core/Common/MsgHandler.h +++ b/Source/Core/Common/MsgHandler.h @@ -5,6 +5,9 @@ #pragma once #include <string> +#include <utility> + +#include <fmt/format.h> namespace Common { @@ -30,6 +33,13 @@ bool MsgAlert(bool yes_no, MsgType style, const char* format, ...) #endif ; void SetEnableAlert(bool enable); + +// Like fmt::format, except the string becomes translatable +template <typename... Args> +std::string FmtFormatT(const char* string, Args&&... args) +{ + return fmt::format(Common::GetStringT(string), std::forward<Args>(args)...); +} } // namespace Common #define SuccessAlert(format, ...) \ |
