summaryrefslogtreecommitdiffstats
path: root/src/gui/BreadCrumbs.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-10-06 17:00:53 -0400
committerDavid Robillard <d@drobilla.net>2024-10-11 19:37:24 -0400
commit021e5d79aaacda9a107829c1c58750c85159dfaa (patch)
treec162bf17180d56b88774011b270b1ea9137fd332 /src/gui/BreadCrumbs.cpp
parent932c0db65e54d24cbc9131e00412a7f0a8f2bcd2 (diff)
downloadingen-021e5d79aaacda9a107829c1c58750c85159dfaa.tar.gz
ingen-021e5d79aaacda9a107829c1c58750c85159dfaa.tar.bz2
ingen-021e5d79aaacda9a107829c1c58750c85159dfaa.zip
Fix confusing iteration over collections of pointers
Diffstat (limited to 'src/gui/BreadCrumbs.cpp')
-rw-r--r--src/gui/BreadCrumbs.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/BreadCrumbs.cpp b/src/gui/BreadCrumbs.cpp
index 50592d4c..476b9996 100644
--- a/src/gui/BreadCrumbs.cpp
+++ b/src/gui/BreadCrumbs.cpp
@@ -69,7 +69,7 @@ BreadCrumbs::build(const raul::Path& path,
if (!_breadcrumbs.empty() && (path.is_parent_of(_full_path) || path == _full_path)) {
// Moving to a path we already contain, just switch the active button
- for (const auto& b : _breadcrumbs) {
+ for (auto* b : _breadcrumbs) {
if (b->path() == path) {
b->set_active(true);
if (!b->view()) {
@@ -107,7 +107,7 @@ BreadCrumbs::build(const raul::Path& path,
suffix = suffix.substr(suffix.find('/') + 1);
}
- for (const auto& b : _breadcrumbs) {
+ for (auto* b : _breadcrumbs) {
b->set_active(false);
}
_breadcrumbs.back()->set_active(true);
@@ -120,7 +120,7 @@ BreadCrumbs::build(const raul::Path& path,
_active_path = path;
// Empty existing breadcrumbs
- for (const auto& b : _breadcrumbs) {
+ for (auto* b : _breadcrumbs) {
remove(*b);
}
_breadcrumbs.clear();
@@ -218,7 +218,7 @@ BreadCrumbs::object_destroyed(const URI& uri)
void
BreadCrumbs::object_moved(const raul::Path& old_path, const raul::Path& new_path)
{
- for (const auto& b : _breadcrumbs) {
+ for (auto* b : _breadcrumbs) {
if (b->path() == old_path) {
b->set_path(new_path);
}