From d035b1f10fe3a2501ea9a63c43d4a9c2e4793d85 Mon Sep 17 00:00:00 2001 From: Corentin Schreiber Date: Sat, 10 Jun 2023 16:08:37 +0100 Subject: [PATCH] Fixed incorrect use of fmt::format, missing fmt::runtime(). --- include/lxgui/gui_localizer.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/lxgui/gui_localizer.hpp b/include/lxgui/gui_localizer.hpp index 2965290df..eb655ebc7 100644 --- a/include/lxgui/gui_localizer.hpp +++ b/include/lxgui/gui_localizer.hpp @@ -23,10 +23,10 @@ class localizer { localizer(); // Non-copiable, non-movable - localizer(const localizer&) = delete; - localizer(localizer&&) = delete; + localizer(const localizer&) = delete; + localizer(localizer&&) = delete; localizer& operator=(const localizer&) = delete; - localizer& operator=(localizer&&) = delete; + localizer& operator=(localizer&&) = delete; /** * \brief Changes the current locale (used to format numbers). @@ -234,10 +234,12 @@ class localizer { constexpr bool is_string = std::is_same_v, std::string>; if constexpr (is_string) { - if constexpr (sizeof...(Args) == 0) + if constexpr (sizeof...(Args) == 0) { return item; - else - return fmt::format(locale_, item, std::forward(args)...); + } else { + return fmt::format( + locale_, fmt::runtime(item), std::forward(args)...); + } } else { auto result = item(std::forward(args)...); if (result.valid() && result.begin() != result.end()) {