diff options
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | src/gui/NodeModule.cpp | 14 | ||||
-rw-r--r-- | src/gui/Port.cpp | 6 |
3 files changed, 10 insertions, 11 deletions
diff --git a/.clang-tidy b/.clang-tidy index ccdb3292..c27770ae 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -61,7 +61,6 @@ Checks: > -llvmlibc-*, -misc-no-recursion, -misc-unused-parameters, - -modernize-loop-convert, -modernize-use-trailing-return-type, -performance-unnecessary-value-param, -portability-simd-intrinsics, diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 1b18958f..902df4ec 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -181,8 +181,8 @@ NodeModule::show_human_names(bool b) set_label(block()->symbol().c_str()); } - for (iterator i = begin(); i != end(); ++i) { - auto* const port = dynamic_cast<ingen::gui::Port*>(*i); + for (auto* p : *this) { + auto* const port = dynamic_cast<ingen::gui::Port*>(p); Glib::ustring label(port->model()->symbol().c_str()); if (b) { const Atom& name_property = port->model()->get_property(uris.lv2_name); @@ -196,7 +196,7 @@ NodeModule::show_human_names(bool b) } } } - (*i)->set_label(label.c_str()); + port->set_label(label.c_str()); } } @@ -238,8 +238,8 @@ NodeModule::port_value_changed(uint32_t index, const Atom& value) void NodeModule::plugin_changed() { - for (iterator p = begin(); p != end(); ++p) { - dynamic_cast<ingen::gui::Port*>(*p)->update_metadata(); + for (auto* p : *this) { + dynamic_cast<ingen::gui::Port*>(p)->update_metadata(); } } @@ -324,8 +324,8 @@ NodeModule::new_port_view(std::shared_ptr<const PortModel> port) Port* NodeModule::port(std::shared_ptr<const PortModel> model) { - for (iterator p = begin(); p != end(); ++p) { - Port* const port = dynamic_cast<Port*>(*p); + for (auto* p : *this) { + auto* const port = dynamic_cast<Port*>(p); if (port->model() == model) { return port; } diff --git a/src/gui/Port.cpp b/src/gui/Port.cpp index b82fa8d1..e7c6b959 100644 --- a/src/gui/Port.cpp +++ b/src/gui/Port.cpp @@ -241,12 +241,12 @@ Port::build_enum_menu() PluginModel::ScalePoints points = block->plugin_model()->port_scale_points( model()->index()); - for (auto i = points.begin(); i != points.end(); ++i) { - menu->items().push_back(Gtk::Menu_Helpers::MenuElem(i->second)); + for (const auto& p : points) { + menu->items().push_back(Gtk::Menu_Helpers::MenuElem(p.second)); Gtk::MenuItem* menu_item = &(menu->items().back()); menu_item->signal_activate().connect( sigc::bind(sigc::mem_fun(this, &Port::on_scale_point_activated), - i->first)); + p.first)); } return menu; |