summaryrefslogtreecommitdiffstats
path: root/src/client/ClientStore.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-01 13:59:31 +0200
committerDavid Robillard <d@drobilla.net>2020-08-02 01:48:48 +0200
commit2539411f2fd0f73b57bd3a8785e10228b32b3c93 (patch)
tree4c991c47e8e16ea914df0681359b2635dfbdd186 /src/client/ClientStore.cpp
parentce23400cbd8cbe8c6a8712ae2ecf88d1053ebc99 (diff)
downloadingen-2539411f2fd0f73b57bd3a8785e10228b32b3c93.tar.gz
ingen-2539411f2fd0f73b57bd3a8785e10228b32b3c93.tar.bz2
ingen-2539411f2fd0f73b57bd3a8785e10228b32b3c93.zip
Fix unnecessary copies in for loops
Diffstat (limited to 'src/client/ClientStore.cpp')
-rw-r--r--src/client/ClientStore.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index a42efd16..64489b49 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -84,7 +84,7 @@ ClientStore::add_object(SPtr<ObjectModel> object)
}
}
- for (auto p : object->properties()) {
+ for (const auto& p : object->properties()) {
object->signal_property().emit(p.first, p.second);
}
}
@@ -475,7 +475,7 @@ ClientStore::operator()(const DisconnectAll& msg)
}
const GraphModel::Arcs arcs = graph->arcs();
- for (auto a : arcs) {
+ for (const auto& a : arcs) {
SPtr<ArcModel> arc = dynamic_ptr_cast<ArcModel>(a.second);
if (arc->tail()->parent() == object
|| arc->head()->parent() == object