diff options
author | David Robillard <d@drobilla.net> | 2020-11-27 17:57:41 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-27 21:42:51 +0100 |
commit | 47e93d947c4b5a468802c168be087b8145a67c62 (patch) | |
tree | d11f3a812ac9e66f473c675890fdbaed3d411456 /src | |
parent | e398029f74d6be188829032f5f4d8a8a9e2fb3f9 (diff) | |
download | patchage-47e93d947c4b5a468802c168be087b8145a67c62.tar.gz patchage-47e93d947c4b5a468802c168be087b8145a67c62.tar.bz2 patchage-47e93d947c4b5a468802c168be087b8145a67c62.zip |
Use range-based for loop
Diffstat (limited to 'src')
-rw-r--r-- | src/Configuration.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Configuration.cpp b/src/Configuration.cpp index d5df719..039cda0 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -167,11 +167,10 @@ Configuration::load() // Try to find a readable configuration file const std::vector<std::string> filenames = get_filenames(); std::ifstream file; - for (size_t i = 0; i < filenames.size(); ++i) { - file.open(filenames[i].c_str(), std::ios::in); + for (const auto& filename : filenames) { + file.open(filename.c_str(), std::ios::in); if (file.good()) { - std::cout << "Loading configuration from " << filenames[i] - << std::endl; + std::cout << "Loading configuration from " << filename << std::endl; break; } } |