summaryrefslogtreecommitdiff
path: root/src/desktop/Popup.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2024-08-26 20:24:30 +0200
committerGitHub <noreply@github.com>2024-08-26 20:24:30 +0200
commit72c7818ae66a18d126e2b4245d649fe3a93d3b8e (patch)
tree194361ee0d4f92eea809b7904d39f02793c55e13 /src/desktop/Popup.cpp
parent1ea47950f4262ec1215087948c7275f8e0115af2 (diff)
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
Diffstat (limited to 'src/desktop/Popup.cpp')
-rw-r--r--src/desktop/Popup.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/desktop/Popup.cpp b/src/desktop/Popup.cpp
index e48b7400..a4952ef7 100644
--- a/src/desktop/Popup.cpp
+++ b/src/desktop/Popup.cpp
@@ -251,7 +251,7 @@ void CPopup::recheckTree() {
void CPopup::recheckChildrenRecursive() {
auto cpy = m_vChildren;
- for (auto& c : cpy) {
+ for (auto const& c : cpy) {
c->onCommit(true);
c->recheckChildrenRecursive();
}
@@ -282,14 +282,14 @@ bool CPopup::visible() {
}
void CPopup::bfHelper(std::vector<CPopup*> nodes, std::function<void(CPopup*, void*)> fn, void* data) {
- for (auto& n : nodes) {
+ for (auto const& n : nodes) {
fn(n, data);
}
std::vector<CPopup*> nodes2;
- for (auto& n : nodes) {
- for (auto& c : n->m_vChildren) {
+ for (auto const& n : nodes) {
+ for (auto const& c : n->m_vChildren) {
nodes2.push_back(c.get());
}
}
@@ -308,7 +308,7 @@ CPopup* CPopup::at(const Vector2D& globalCoords, bool allowsInput) {
std::vector<CPopup*> popups;
breadthfirst([](CPopup* popup, void* data) { ((std::vector<CPopup*>*)data)->push_back(popup); }, &popups);
- for (auto& p : popups | std::views::reverse) {
+ for (auto const& p : popups | std::views::reverse) {
if (!p->m_pResource)
continue;