Skip to content

Commit

Permalink
slic3r:utils: Fix type mismatch in ternary
Browse files Browse the repository at this point in the history
src/slic3r/Utils/OctoPrint.cpp: In lambda function:
src/slic3r/Utils/OctoPrint.cpp:754:36: error: operands to ‘?:’ have
different types ‘std::wstring’ {aka ‘std::__cxx11::basic_string<wchar_t>
’} and ‘wxString’
  754 |                     si.name = name ? boost::nowide::widen(*name) : wxString();
      |                               ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Loading branch information
cryptomilk committed Feb 18, 2025
1 parent e173479 commit e186e1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/slic3r/Utils/OctoPrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ bool PrusaLink::get_storage(wxArrayString& storage_path, wxArrayString& storage_
if (path && (!available || *available)) {
StorageInfo si;
si.path = boost::nowide::widen(*path);
si.name = name ? boost::nowide::widen(*name) : wxString();
si.name = name ? boost::nowide::widen(*name) : std::wstring();
// If read_only is missing, assume it is NOT read only.
// si.read_only = read_only ? *read_only : false; // version without "ro"
si.read_only = (read_only ? *read_only : (ro ? *ro : false));
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/Utils/PrusaConnect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ bool PrusaConnectNew::get_storage(wxArrayString& storage_path, wxArrayString& st
if (path && (!available || *available)) {
StorageInfo si;
si.path = boost::nowide::widen(*path);
si.name = name ? boost::nowide::widen(*name) : wxString();
si.name = name ? boost::nowide::widen(*name) : std::wstring();
// If read_only is missing, assume it is NOT read only.
// si.read_only = read_only ? *read_only : false; // version without "ro"
si.read_only = (read_only ? *read_only : (ro ? *ro : false));
Expand Down

0 comments on commit e186e1c

Please sign in to comment.