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

View File

@ -2679,11 +2679,11 @@ bool Node::is_part_of_edited_scene() const {
void Node::get_storable_properties(HashSet<StringName> &r_storable_properties) const {
ERR_THREAD_GUARD
List<PropertyInfo> pi;
get_property_list(&pi);
for (List<PropertyInfo>::Element *E = pi.front(); E; E = E->next()) {
if ((E->get().usage & PROPERTY_USAGE_STORAGE)) {
r_storable_properties.insert(E->get().name);
List<PropertyInfo> property_list;
get_property_list(&property_list);
for (const PropertyInfo &pi : property_list) {
if ((pi.usage & PROPERTY_USAGE_STORAGE)) {
r_storable_properties.insert(pi.name);
}
}
}