Use C++ iterators for Lists in many situations
This commit is contained in:
@@ -76,8 +76,7 @@ class SectionedInspectorFilter : public Object {
|
||||
|
||||
List<PropertyInfo> pinfo;
|
||||
edited->get_property_list(&pinfo);
|
||||
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
|
||||
PropertyInfo pi = E->get();
|
||||
for (PropertyInfo &pi : pinfo) {
|
||||
int sp = pi.name.find("/");
|
||||
|
||||
if (pi.name == "resource_path" || pi.name == "resource_name" || pi.name == "resource_local_to_scene" || pi.name.begins_with("script/") || pi.name.begins_with("_global_script")) { //skip resource stuff
|
||||
@@ -221,9 +220,7 @@ void SectionedInspector::update_category_list() {
|
||||
filter = search_box->get_text();
|
||||
}
|
||||
|
||||
for (List<PropertyInfo>::Element *E = pinfo.front(); E; E = E->next()) {
|
||||
PropertyInfo pi = E->get();
|
||||
|
||||
for (PropertyInfo &pi : pinfo) {
|
||||
if (pi.usage & PROPERTY_USAGE_CATEGORY) {
|
||||
continue;
|
||||
} else if (!(pi.usage & PROPERTY_USAGE_EDITOR) || (restrict_to_basic && !(pi.usage & PROPERTY_USAGE_EDITOR_BASIC_SETTING))) {
|
||||
|
||||
Reference in New Issue
Block a user