Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build errors reported by gcc 14 #13856

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

cryptomilk
Copy link

gcc 14 reports ambiguous function calls and ternary type mismatches. The patches of this PR address those issues.

src/slic3r/GUI/Plater.cpp: In member function ‘void Slic3r::GUI::Plater::load_project(const wxString&)’:
src/slic3r/GUI/Plater.cpp:4423: error: call of overloaded ‘load_files(<brace-enclosed initializer list>)’ is ambiguous
 4423 |     if (! load_files({ into_path(filename) }).empty()) {
In file included from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/Plater.cpp:20:
src/slic3r/GUI/Plater.hpp:127:25: note: candidate: ‘std::vector<long unsigned int> Slic3r::GUI::Plater::load_files(const std::vector<boost::
filesystem::path>&, bool, bool, bool)’
  127 |     std::vector<size_t> load_files(const std::vector<boost::filesystem::path>& input_files, bool load_model = true, bool load_config = true, bool imperial_units = false);
      |                         ^~~~~~~~~~
src/slic3r/GUI/Plater.hpp:131:10: note: candidate: ‘bool Slic3r::GUI::Plater::load_files(const wxArrayString&, bool)’
  131 |     bool load_files(const wxArrayString& filenames, bool delete_after_load = false);
      |          ^~~~~~~~~~
src/slic3r/GUI/PhysicalPrinterDialog.cpp: In member function ‘void Slic3r::GUI::PhysicalPrinterDialog::build_printhost_settings(Slic3r::GUI::ConfigOptionsGroup*)’:
/home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/PhysicalPrinterDialog.cpp:610: error: call of overloaded ‘set_values(<brace-enclosed initializer list>)’ is ambiguous
  610 |         choice->set_values({ m_config->opt_string("printhost_port") });
In file included from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/OptionsGroup.hpp:24,
                 from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/Search.hpp:24,
                 from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/MainFrame.hpp:30,
                 from /home/asn/workspace/prj/oss/PrusaSlicer/asn-debug/src/slic3r/GUI/PhysicalPrinterDialog.cpp:31:
src/slic3r/GUI/Field.hpp:446:33: note: candidate: ‘void Slic3r::GUI::Choice::set_values(const std::vector<std::__cxx11::basic_string<char> >
&)’
  446 |         void                    set_values(const std::vector<std::string> &values);
      |                                 ^~~~~~~~~~
src/slic3r/GUI/Field.hpp:447:33: note: candidate: ‘void Slic3r::GUI::Choice::set_values(const wxArrayString&)’
  447 |         void                    set_values(const wxArrayString &values);
      |                                 ^~~~~~~~~~
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();
      |                               ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant