Using iterator pattern instead of List::Element *.

Co-authored-by: Adam Scott <ascott.ca@gmail.com>
This commit is contained in:
Yyf2333
2025-02-03 14:16:27 +08:00
committed by Yufeng Ying
parent 594d64ec24
commit 22b5ec17fb
36 changed files with 150 additions and 173 deletions
+2 -2
View File
@@ -142,8 +142,8 @@ void ProjectManager::_build_icon_type_cache(Ref<Theme> p_theme) {
}
List<StringName> tl;
p_theme->get_icon_list(EditorStringName(EditorIcons), &tl);
for (List<StringName>::Element *E = tl.front(); E; E = E->next()) {
icon_type_cache[E->get()] = p_theme->get_icon(E->get(), EditorStringName(EditorIcons));
for (const StringName &name : tl) {
icon_type_cache[name] = p_theme->get_icon(name, EditorStringName(EditorIcons));
}
}