Codechange: Pass reference instead of pointer to GUI*Lists. (#10822)

Pointer-avoidance.
This commit is contained in:
PeterN
2023-05-14 09:17:44 +01:00
committed by GitHub
parent 23ce42ad91
commit 64930c343a
6 changed files with 23 additions and 23 deletions

View File

@@ -690,9 +690,9 @@ private:
ShowDropDownList(this, std::move(list), sel, widget);
}
void AddChildren(GUIGroupList *source, GroupID parent, int indent)
void AddChildren(GUIGroupList &source, GroupID parent, int indent)
{
for (const Group *g : *source) {
for (const Group *g : source) {
if (g->parent != parent) continue;
this->groups.push_back(g);
this->indents.push_back(indent);
@@ -740,7 +740,7 @@ private:
return r < 0;
});
AddChildren(&list, INVALID_GROUP, 0);
AddChildren(list, INVALID_GROUP, 0);
}
this->groups.shrink_to_fit();