summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-25 16:37:00 -0500
committerDavid Robillard <d@drobilla.net>2017-12-25 16:37:00 -0500
commit37729e5b314e39fb750a3fb46a005acdb15b4ac2 (patch)
tree5e8e316e9f186dc47bfef09c7546cc3a8f14f6bb /src/client
parent05bce078b6b5cfc64f10399da3a422d00fe6f790 (diff)
downloadingen-37729e5b314e39fb750a3fb46a005acdb15b4ac2.tar.gz
ingen-37729e5b314e39fb750a3fb46a005acdb15b4ac2.tar.bz2
ingen-37729e5b314e39fb750a3fb46a005acdb15b4ac2.zip
Use auto for iterators
Diffstat (limited to 'src/client')
-rw-r--r--src/client/BlockModel.cpp4
-rw-r--r--src/client/ClientStore.cpp6
-rw-r--r--src/client/GraphModel.cpp8
-rw-r--r--src/client/ObjectModel.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/client/BlockModel.cpp b/src/client/BlockModel.cpp
index 95819c1e..cf778408 100644
--- a/src/client/BlockModel.cpp
+++ b/src/client/BlockModel.cpp
@@ -67,7 +67,7 @@ BlockModel::~BlockModel()
void
BlockModel::remove_port(SPtr<PortModel> port)
{
- for (Ports::iterator i = _ports.begin(); i != _ports.end(); ++i) {
+ for (auto i = _ports.begin(); i != _ports.end(); ++i) {
if ((*i) == port) {
_ports.erase(i);
break;
@@ -79,7 +79,7 @@ BlockModel::remove_port(SPtr<PortModel> port)
void
BlockModel::remove_port(const Raul::Path& port_path)
{
- for (Ports::iterator i = _ports.begin(); i != _ports.end(); ++i) {
+ for (auto i = _ports.begin(); i != _ports.end(); ++i) {
if ((*i)->path() == port_path) {
_ports.erase(i);
break;
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 123b9050..356a6b31 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -55,7 +55,7 @@ ClientStore::add_object(SPtr<ObjectModel> object)
{
// If we already have "this" object, merge the existing one into the new
// one (with precedence to the new values).
- iterator existing = find(object->path());
+ auto existing = find(object->path());
if (existing != end()) {
dynamic_ptr_cast<ObjectModel>(existing->second)->set(object);
} else {
@@ -202,7 +202,7 @@ ClientStore::operator()(const Del& del)
if (uri_is_path(del.uri)) {
remove_object(uri_to_path(del.uri));
} else {
- Plugins::iterator p = _plugins->find(del.uri);
+ auto p = _plugins->find(del.uri);
if (p != _plugins->end()) {
_plugins->erase(p);
_signal_plugin_deleted.emit(del.uri);
@@ -296,7 +296,7 @@ ClientStore::operator()(const Put& msg)
model->set_properties(properties);
add_object(model);
} else if (is_block) {
- Iterator p = properties.find(_uris.lv2_prototype);
+ auto p = properties.find(_uris.lv2_prototype);
if (p == properties.end()) {
p = properties.find(_uris.ingen_prototype);
}
diff --git a/src/client/GraphModel.cpp b/src/client/GraphModel.cpp
index 762ed8ed..b5838d19 100644
--- a/src/client/GraphModel.cpp
+++ b/src/client/GraphModel.cpp
@@ -67,8 +67,8 @@ GraphModel::remove_arcs_on(SPtr<PortModel> p)
{
// Remove any connections which referred to this object,
// since they can't possibly exist anymore
- for (Arcs::iterator j = _arcs.begin(); j != _arcs.end();) {
- Arcs::iterator next = j;
+ for (auto j = _arcs.begin(); j != _arcs.end();) {
+ auto next = j;
++next;
SPtr<ArcModel> arc = dynamic_ptr_cast<ArcModel>(j->second);
@@ -97,7 +97,7 @@ GraphModel::clear()
SPtr<ArcModel>
GraphModel::get_arc(const Node* tail, const Node* head)
{
- Arcs::iterator i = _arcs.find(std::make_pair(tail, head));
+ auto i = _arcs.find(std::make_pair(tail, head));
if (i != _arcs.end()) {
return dynamic_ptr_cast<ArcModel>(i->second);
} else {
@@ -144,7 +144,7 @@ GraphModel::add_arc(SPtr<ArcModel> arc)
void
GraphModel::remove_arc(const Node* tail, const Node* head)
{
- Arcs::iterator i = _arcs.find(std::make_pair(tail, head));
+ auto i = _arcs.find(std::make_pair(tail, head));
if (i != _arcs.end()) {
SPtr<ArcModel> arc = dynamic_ptr_cast<ArcModel>(i->second);
_signal_removed_arc.emit(arc);
diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp
index 5aee03ce..45136546 100644
--- a/src/client/ObjectModel.cpp
+++ b/src/client/ObjectModel.cpp
@@ -58,7 +58,7 @@ const Atom&
ObjectModel::get_property(const Raul::URI& key) const
{
static const Atom null_atom;
- Properties::const_iterator i = properties().find(key);
+ auto i = properties().find(key);
return (i != properties().end()) ? i->second : null_atom;
}