1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Use range iterators for RBSet in most cases

This commit is contained in:
Aaron Record
2022-05-18 17:43:40 -06:00
parent 71c40ff4da
commit 900c676b02
84 changed files with 782 additions and 782 deletions

View File

@@ -268,25 +268,25 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const {
vclist.insert(vc);
}
for (RBSet<_EVCSort>::Element *E = vclist.front(); E; E = E->next()) {
for (const _EVCSort &E : vclist) {
uint32_t pusage = PROPERTY_USAGE_NONE;
if (E->get().save || !optimize_save) {
if (E.save || !optimize_save) {
pusage |= PROPERTY_USAGE_STORAGE;
}
if (!E->get().name.begins_with("_") && !E->get().name.begins_with("projects/")) {
if (!E.name.begins_with("_") && !E.name.begins_with("projects/")) {
pusage |= PROPERTY_USAGE_EDITOR;
} else {
pusage |= PROPERTY_USAGE_STORAGE; //hiddens must always be saved
}
PropertyInfo pi(E->get().type, E->get().name);
PropertyInfo pi(E.type, E.name);
pi.usage = pusage;
if (hints.has(E->get().name)) {
pi = hints[E->get().name];
if (hints.has(E.name)) {
pi = hints[E.name];
}
if (E->get().restart_if_changed) {
if (E.restart_if_changed) {
pi.usage |= PROPERTY_USAGE_RESTART_IF_CHANGED;
}