From 9de1476ffe2040cf693d06017d91ce694d91e25b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 26 Nov 2011 00:10:45 +0000 Subject: 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 --- src/Patchage.cpp | 2 +- src/PatchageCanvas.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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(*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 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(*i); if (!module) continue; -- cgit v1.2.1