Skip to content

Commit 5aee797

Browse files
fuhlig1rbx
authored andcommitted
Fix FairLogger crash when used with C++23
1 parent f4458f2 commit 5aee797

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

logger/Logger.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,10 @@ class Logger
244244
bgWhite = 107
245245
};
246246

247-
static std::string startColor(Color color) { return fmt::format("\033[01;{}m", static_cast<int>(color)); }
247+
static std::string startColor(Color color) { return fmt::format(fmt::runtime("\033[01;{}m"), static_cast<int>(color)); }
248+
248249
static std::string endColor() { return "\033[0m"; }
249-
static std::string ColorOut(Color c, std::string_view s) { return fmt::format("\033[01;{}m{}\033[0m", static_cast<int>(c), s); }
250+
static std::string ColorOut(Color c, std::string_view s) { return fmt::format(fmt::runtime("\033[01;{}m{}\033[0m"), static_cast<int>(c), s); }
250251
static std::string GetColoredSeverityString(Severity severity);
251252

252253
static void SetConsoleSeverity(const Severity severity);

0 commit comments

Comments
 (0)