Skip to content

Commit 7bb542a

Browse files
committed
Fix compiling with wxWidgets 3.3
wxWidgets 3.3 has stopped defining in global scope all operators including "+" on wx types, causing some string concatenations to fail. All the constants from ImGui used by marker_by_type() are of type wchar_t. Stop returning them as type char. PrusaSlicer-version_2.9.3/src/slic3r/GUI/Search.cpp:253:62: error: no match for ‘operator+’ (operand types are ‘char’ and ‘const std::wstring’ {aka ‘const std::__cxx11::basic_string<wchar_t>’}) 253 | return marker_by_type(opt.type, printer_technology) + | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ | | | char 254 | opt.category_local + sep + | ~~~~~~~~~~~~~~~~~~ | | | const std::wstring {aka const std::__cxx11::basic_string<wchar_t>}
1 parent f1776c0 commit 7bb542a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/slic3r/GUI/Search.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ using GUI::into_u8;
3838

3939
namespace Search {
4040

41-
static char marker_by_type(Preset::Type type, PrinterTechnology pt)
41+
static wchar_t marker_by_type(Preset::Type type, PrinterTechnology pt)
4242
{
4343
switch(type) {
4444
case Preset::TYPE_PRINT:
@@ -53,7 +53,7 @@ static char marker_by_type(Preset::Type type, PrinterTechnology pt)
5353
case Preset::TYPE_PREFERENCES:
5454
return ImGui::PreferencesButton;
5555
default:
56-
return ' ';
56+
return L' ';
5757
}
5858
}
5959

0 commit comments

Comments
 (0)