From 6b123d4bc61c2db8e379dd5e681834c4053e661d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 22 Aug 2024 10:26:43 +0100 Subject: Use C++20 instead of fmtlib when available. --- modules/codepage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/codepage.cpp') diff --git a/modules/codepage.cpp b/modules/codepage.cpp index 9836289ad..c51557aa8 100644 --- a/modules/codepage.cpp +++ b/modules/codepage.cpp @@ -329,9 +329,9 @@ private: static std::string GetPrintable(uint32_t chr) { if (isprint(chr)) - return fmt::format("{} ({})", reinterpret_cast(&chr), chr); + return FMT::format("{} ({})", reinterpret_cast(&chr), chr); else - return fmt::format("{}", chr); + return FMT::format("{}", chr); } public: @@ -387,11 +387,11 @@ public: break; case Codepage::AllowCharacterResult::NOT_VALID: - throw ModuleException(this, fmt::format(" tag contains a forbidden character: {} at {}", + throw ModuleException(this, FMT::format(" tag contains a forbidden character: {} at {}", GetPrintable(pos), tag->source.str())); case Codepage::AllowCharacterResult::NOT_VALID_AT_FRONT: - throw ModuleException(this, fmt::format(" tag contains a forbidden front character: {} at {}", + throw ModuleException(this, FMT::format(" tag contains a forbidden front character: {} at {}", GetPrintable(pos), tag->source.str())); } } -- cgit v1.3.1-10-gc9f91