From 5a873dd1e55d96b5585cc8ceb7b7fbae1679c5a6 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Tue, 30 Nov 2021 13:49:22 +0100 Subject: [PATCH] Fixing a loophole in GUI::format() for UTF8 template input. --- src/slic3r/GUI/format.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/slic3r/GUI/format.hpp b/src/slic3r/GUI/format.hpp index 928171cd5..51beafff1 100644 --- a/src/slic3r/GUI/format.hpp +++ b/src/slic3r/GUI/format.hpp @@ -30,6 +30,14 @@ inline wxString format_wxstr(const wxString& fmt, TArgs&&... args) { return format_wxstr(fmt.ToUTF8().data(), std::forward(args)...); } template +inline std::string format(const char* fmt, TArgs&&... args) { + return Slic3r::format(fmt, std::forward(args)...); +} +template +inline std::string format(const std::string& fmt, TArgs&&... args) { + return Slic3r::format(fmt, std::forward(args)...); +} +template inline std::string format(const wxString& fmt, TArgs&&... args) { return Slic3r::format(fmt.ToUTF8().data(), std::forward(args)...); }