diff options
author | David Robillard <d@drobilla.net> | 2020-02-09 14:41:18 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-09 14:41:18 +0100 |
commit | 3c29614ed1452868909840fc5307652ecc26d295 (patch) | |
tree | bf6cf3425f40538833e1d4dc47efe763b7ccf949 /src/PatchageModule.cpp | |
parent | af5ec4bdda21e9a2f76f22050216a0b1cbbed575 (diff) | |
download | patchage-3c29614ed1452868909840fc5307652ecc26d295.tar.gz patchage-3c29614ed1452868909840fc5307652ecc26d295.tar.bz2 patchage-3c29614ed1452868909840fc5307652ecc26d295.zip |
Use range-based for loops in more places
Diffstat (limited to 'src/PatchageModule.cpp')
-rw-r--r-- | src/PatchageModule.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp index db61392..cf2ba71 100644 --- a/src/PatchageModule.cpp +++ b/src/PatchageModule.cpp @@ -138,15 +138,16 @@ PatchageModule::join() void PatchageModule::menu_disconnect_all() { - for (iterator p = begin(); p != end(); ++p) - (*p)->disconnect(); + for (Ganv::Port* p : *this) { + p->disconnect(); + } } PatchagePort* PatchageModule::get_port(const std::string& name) { - for (iterator p = begin(); p != end(); ++p) { - PatchagePort* pport = dynamic_cast<PatchagePort*>(*p); + for (Ganv::Port* p : *this) { + PatchagePort* pport = dynamic_cast<PatchagePort*>(p); if (pport && pport->name() == name) { return pport; } |