summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-28 23:52:02 +0100
committerDavid Robillard <d@drobilla.net>2020-11-28 23:52:02 +0100
commit603f5ac892cb2f4d7bde67b1151e1509d92ffbcc (patch)
tree704cd8148268d1fde2066990e76a7f1e3c92e71a
parentfe955f180f114672f6f27e1fd34acf4db7e1331e (diff)
downloadpatchage-603f5ac892cb2f4d7bde67b1151e1509d92ffbcc.tar.gz
patchage-603f5ac892cb2f4d7bde67b1151e1509d92ffbcc.tar.bz2
patchage-603f5ac892cb2f4d7bde67b1151e1509d92ffbcc.zip
Use auto for iterators
-rw-r--r--src/Configuration.cpp3
-rw-r--r--src/PatchageModule.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index 8b0f03a..d35ae7a 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -83,8 +83,7 @@ Configuration::get_module_location(const std::string& name,
SignalDirection type,
Coord& loc) const
{
- std::map<std::string, ModuleSettings>::const_iterator i =
- _module_settings.find(name);
+ auto i = _module_settings.find(name);
if (i == _module_settings.end()) {
return false;
}
diff --git a/src/PatchageModule.cpp b/src/PatchageModule.cpp
index a4d2fe9..3662172 100644
--- a/src/PatchageModule.cpp
+++ b/src/PatchageModule.cpp
@@ -60,7 +60,7 @@ PatchageModule::update_menu()
if (_type == SignalDirection::duplex) {
bool has_in = false;
bool has_out = false;
- for (const_iterator p = begin(); p != end(); ++p) {
+ for (auto p = begin(); p != end(); ++p) {
if ((*p)->is_input()) {
has_in = true;
} else {