From 021e5d79aaacda9a107829c1c58750c85159dfaa Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 6 Oct 2024 17:00:53 -0400 Subject: Fix confusing iteration over collections of pointers --- src/gui/BreadCrumbs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/BreadCrumbs.cpp') 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); } -- cgit v1.2.1