diff options
author | David Robillard <d@drobilla.net> | 2011-11-26 00:10:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-11-26 00:10:45 +0000 |
commit | 9de1476ffe2040cf693d06017d91ce694d91e25b (patch) | |
tree | 1f11516a4e04d1cbddcdba1f9f3dba79f999bafd | |
parent | d660a764ac2237f5e2fe5190e90b31209b1d70da (diff) | |
download | patchage-9de1476ffe2040cf693d06017d91ce694d91e25b.tar.gz patchage-9de1476ffe2040cf693d06017d91ce694d91e25b.tar.bz2 patchage-9de1476ffe2040cf693d06017d91ce694d91e25b.zip |
Don't expose non-const references to internal canvas collections.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3634 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/Patchage.cpp | 2 | ||||
-rw-r--r-- | src/PatchageCanvas.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Patchage.cpp b/src/Patchage.cpp index a846a20..b5f621e 100644 --- a/src/Patchage.cpp +++ b/src/Patchage.cpp @@ -392,7 +392,7 @@ Patchage::warning_msg(const std::string& msg) void Patchage::update_state() { - for (FlowCanvas::Canvas::Items::iterator i = _canvas->items().begin(); + for (FlowCanvas::Canvas::Items::const_iterator i = _canvas->items().begin(); i != _canvas->items().end(); ++i) { FlowCanvas::Module* module = dynamic_cast<FlowCanvas::Module*>(*i); if (module) diff --git a/src/PatchageCanvas.cpp b/src/PatchageCanvas.cpp index 0eba567..b9a00ba 100644 --- a/src/PatchageCanvas.cpp +++ b/src/PatchageCanvas.cpp @@ -125,7 +125,7 @@ void PatchageCanvas::remove_ports(bool (*pred)(const PatchagePort*)) { std::set<PatchageModule*> empty; - for (Items::iterator i = items().begin(); i != items().end(); ++i) { + for (Items::const_iterator i = items().begin(); i != items().end(); ++i) { PatchageModule* module = dynamic_cast<PatchageModule*>(*i); if (!module) continue; |