Fixing a loophole in GUI::format() for UTF8 template input.

This commit is contained in:
Vojtech Bubnik 2021-11-30 13:49:22 +01:00
parent c514f45260
commit 5a873dd1e5

View File

@ -30,6 +30,14 @@ inline wxString format_wxstr(const wxString& fmt, TArgs&&... args) {
return format_wxstr(fmt.ToUTF8().data(), std::forward<TArgs>(args)...);
}
template<typename... TArgs>
inline std::string format(const char* fmt, TArgs&&... args) {
return Slic3r::format(fmt, std::forward<TArgs>(args)...);
}
template<typename... TArgs>
inline std::string format(const std::string& fmt, TArgs&&... args) {
return Slic3r::format(fmt, std::forward<TArgs>(args)...);
}
template<typename... TArgs>
inline std::string format(const wxString& fmt, TArgs&&... args) {
return Slic3r::format(fmt.ToUTF8().data(), std::forward<TArgs>(args)...);
}