Use C++ iterators for Lists in many situations
This commit is contained in:
parent
b918c4c3ce
commit
4e6efd1b07
218 changed files with 2755 additions and 3004 deletions
|
|
@ -94,8 +94,8 @@ Error ResourceSaver::save(const String &p_path, const RES &p_resource, uint32_t
|
|||
bool recognized = false;
|
||||
saver[i]->get_recognized_extensions(p_resource, &extensions);
|
||||
|
||||
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
|
||||
if (E->get().nocasecmp_to(extension) == 0) {
|
||||
for (String &E : extensions) {
|
||||
if (E.nocasecmp_to(extension) == 0) {
|
||||
recognized = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -236,8 +236,7 @@ void ResourceSaver::add_custom_savers() {
|
|||
List<StringName> global_classes;
|
||||
ScriptServer::get_global_class_list(&global_classes);
|
||||
|
||||
for (List<StringName>::Element *E = global_classes.front(); E; E = E->next()) {
|
||||
StringName class_name = E->get();
|
||||
for (StringName &class_name : global_classes) {
|
||||
StringName base_class = ScriptServer::get_global_class_native_base(class_name);
|
||||
|
||||
if (base_class == custom_saver_base_class) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue