mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-25 09:41:11 -06:00
Fixing Clang warnings 3
This commit is contained in:
parent
b85de89751
commit
1834ebe981
21 changed files with 25 additions and 29 deletions
|
|
@ -1889,7 +1889,7 @@ void Control::show_cog_icon_context_menu()
|
|||
[]() { return true; }, [this]() { return m_extra_style & wxSL_VALUE_LABEL; }, GUI::wxGetApp().plater());
|
||||
|
||||
append_submenu(&menu, ruler_mode_menu, wxID_ANY, _L("Ruler mode"), _L("Set ruler mode"), "",
|
||||
[this]() { return true; }, this);
|
||||
[]() { return true; }, this);
|
||||
}
|
||||
|
||||
if (m_mode == MultiAsSingle && m_draw_mode == dmRegular)
|
||||
|
|
|
|||
|
|
@ -648,7 +648,7 @@ void FirmwareDialog::priv::perform_upload()
|
|||
}
|
||||
}
|
||||
})
|
||||
.on_message([q, extra_verbose](const char *msg, unsigned /* size */) {
|
||||
.on_message([q](const char *msg, unsigned /* size */) {
|
||||
if (extra_verbose) {
|
||||
BOOST_LOG_TRIVIAL(debug) << "avrdude: " << msg;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4582,9 +4582,9 @@ bool GLCanvas3D::_init_main_toolbar()
|
|||
"\n" + "[" + GUI::shortkey_ctrl_prefix() + "4] - " + _u8L("Printer Settings Tab") ;
|
||||
item.sprite_id = 10;
|
||||
item.enabling_callback = GLToolbarItem::Default_Enabling_Callback;
|
||||
item.visibility_callback = [this]() { return (wxGetApp().app_config->get("new_settings_layout_mode") == "1" ||
|
||||
wxGetApp().app_config->get("dlg_settings_layout_mode") == "1"); };
|
||||
item.left.action_callback = [this]() { wxGetApp().mainframe->select_tab(); };
|
||||
item.visibility_callback = []() { return (wxGetApp().app_config->get("new_settings_layout_mode") == "1" ||
|
||||
wxGetApp().app_config->get("dlg_settings_layout_mode") == "1"); };
|
||||
item.left.action_callback = []() { wxGetApp().mainframe->select_tab(); };
|
||||
if (!m_main_toolbar.add_item(item))
|
||||
return false;
|
||||
|
||||
|
|
@ -5910,8 +5910,7 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
|
|||
tbb::blocked_range<size_t>(0, ctxt.layers.size(), grain_size),
|
||||
[&ctxt, &new_volume, is_selected_separate_extruder, this](const tbb::blocked_range<size_t>& range) {
|
||||
GLVolumePtrs vols;
|
||||
std::vector<size_t> color_print_layer_to_glvolume;
|
||||
auto volume = [&ctxt, &vols, &color_print_layer_to_glvolume, &range](size_t layer_idx, int extruder, int feature) -> GLVolume& {
|
||||
auto volume = [&ctxt, &vols](size_t layer_idx, int extruder, int feature) -> GLVolume& {
|
||||
return *vols[ctxt.color_by_color_print()?
|
||||
ctxt.color_print_color_idx_by_layer_idx_and_extruder(layer_idx, extruder) :
|
||||
ctxt.color_by_tool() ?
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ wxSizer* ObjectLayers::create_layer(const t_layer_height_range& range, PlusMinus
|
|||
// Add control for the "Layer height"
|
||||
|
||||
editor = new LayerRangeEditor(this, double_to_string(m_object->layer_config_ranges[range].option("layer_height")->getFloat()), etLayerHeight, set_focus_data,
|
||||
[range, this](coordf_t layer_height, bool, bool)
|
||||
[range](coordf_t layer_height, bool, bool)
|
||||
{
|
||||
return wxGetApp().obj_list()->edit_layer_range(range, layer_height);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -893,7 +893,7 @@ void GLGizmoSlaSupports::on_set_state()
|
|||
// Only take the snapshot when the USER opens the gizmo. Common gizmos
|
||||
// data are not yet available, the CallAfter will postpone taking the
|
||||
// snapshot until they are. No, it does not feel right.
|
||||
wxGetApp().CallAfter([this]() {
|
||||
wxGetApp().CallAfter([]() {
|
||||
Plater::TakeSnapshot snapshot(wxGetApp().plater(), _(L("SLA gizmo turned on")));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -940,7 +940,7 @@ void ImGuiWrapper::init_font(bool compress)
|
|||
config.MergeMode = true;
|
||||
if (! m_font_cjk) {
|
||||
// Apple keyboard shortcuts are only contained in the CJK fonts.
|
||||
ImFont *font_cjk = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/NotoSansCJK-Regular.ttc").c_str(), m_font_size, &config, ranges_keyboard_shortcuts);
|
||||
[[maybe_unused]]ImFont *font_cjk = io.Fonts->AddFontFromFileTTF((Slic3r::resources_dir() + "/fonts/NotoSansCJK-Regular.ttc").c_str(), m_font_size, &config, ranges_keyboard_shortcuts);
|
||||
assert(font_cjk != nullptr);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1208,7 +1208,7 @@ void ObjectDataViewModel::AddAllChildren(const wxDataViewItem& parent)
|
|||
ItemAdded(parent, wxDataViewItem((void*)child));
|
||||
}
|
||||
|
||||
for (const auto item : array)
|
||||
for (const auto& item : array)
|
||||
AddAllChildren(item);
|
||||
|
||||
m_ctrl->Expand(parent);
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co
|
|||
m_fields.emplace(id, Choice::Create<Choice>(this->ctrl_parent(), opt, id));
|
||||
break;
|
||||
case coPoints:
|
||||
m_fields.emplace(id, std::move(PointCtrl::Create<PointCtrl>(this->ctrl_parent(), opt, id)));
|
||||
m_fields.emplace(id, PointCtrl::Create<PointCtrl>(this->ctrl_parent(), opt, id));
|
||||
break;
|
||||
case coNone: break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ bool FlashAir::test(wxString &msg) const
|
|||
res = false;
|
||||
msg = format_error(body, error, status);
|
||||
})
|
||||
.on_complete([&, this](std::string body, unsigned) {
|
||||
.on_complete([&](std::string body, unsigned) {
|
||||
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got upload enabled: %2%") % name % body;
|
||||
|
||||
res = boost::starts_with(body, "1");
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ bool Repetier::get_groups(wxArrayString& groups) const
|
|||
http.on_error([&](std::string body, std::string error, unsigned status) {
|
||||
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error getting version: %2%, HTTP %3%, body: `%4%`") % name % error % status % body;
|
||||
})
|
||||
.on_complete([&, this](std::string body, unsigned) {
|
||||
.on_complete([&](std::string body, unsigned) {
|
||||
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got groups: %2%") % name % body;
|
||||
|
||||
try {
|
||||
|
|
@ -233,7 +233,7 @@ bool Repetier::get_printers(wxArrayString& printers) const
|
|||
BOOST_LOG_TRIVIAL(error) << boost::format("%1%: Error listing printers: %2%, HTTP %3%, body: `%4%`") % name % error % status % body;
|
||||
res = false;
|
||||
})
|
||||
.on_complete([&, this](std::string body, unsigned http_status) {
|
||||
.on_complete([&](std::string body, unsigned http_status) {
|
||||
BOOST_LOG_TRIVIAL(debug) << boost::format("%1%: Got printers: %2%, HTTP status: %3%") % name % body % http_status;
|
||||
|
||||
if (http_status != 200)
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ public:
|
|||
bool is_immutable() const override { return true; }
|
||||
bool is_optional() const override { return m_optional; }
|
||||
// If it is an immutable object, return its pointer. There is a map assigning a temporary ObjectID to the immutable object pointer.
|
||||
const void* immutable_object_ptr() const { return (const void*)m_shared_object.get(); }
|
||||
const void* immutable_object_ptr() const override { return (const void*)m_shared_object.get(); }
|
||||
|
||||
// Estimated size in memory, to be used to drop least recently used snapshots.
|
||||
size_t memsize() const override {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue