From 3c29614ed1452868909840fc5307652ecc26d295 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 9 Feb 2020 14:41:18 +0100 Subject: Use range-based for loops in more places --- src/Patchage.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Patchage.cpp') diff --git a/src/Patchage.cpp b/src/Patchage.cpp index b400e85..b180f69 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -926,8 +926,8 @@ update_port_colors(GanvNode* node, void* data) return; } - for (PatchageModule::iterator i = pmod->begin(); i != pmod->end(); ++i) { - PatchagePort* port = dynamic_cast(*i); + for (Ganv::Port* p : *pmod) { + PatchagePort* port = dynamic_cast(p); if (port) { const uint32_t rgba = patchage->conf()->get_port_color(port->type()); @@ -1001,10 +1001,10 @@ Patchage::on_export_image() types["*.pdf"] = "Portable Document Format"; types["*.ps"] = "PostScript"; types["*.svg"] = "Scalable Vector Graphics"; - for (Types::const_iterator t = types.begin(); t != types.end(); ++t) { + for (const auto& t : types) { Gtk::FileFilter filt; - filt.add_pattern(t->first); - filt.set_name(t->second); + filt.add_pattern(t.first); + filt.set_name(t.second); dialog.add_filter(filt); } -- cgit v1.2.1