1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Use range iterators for Map

This commit is contained in:
Lightning_A
2021-08-09 14:13:42 -06:00
parent e4dfa69bcf
commit c63b18507d
154 changed files with 1897 additions and 1897 deletions

View File

@@ -200,12 +200,12 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
}
void EditorDebuggerInspector::clear_cache() {
for (Map<ObjectID, EditorDebuggerRemoteObject *>::Element *E = remote_objects.front(); E; E = E->next()) {
for (const KeyValue<ObjectID, EditorDebuggerRemoteObject *> &E : remote_objects) {
EditorNode *editor = EditorNode::get_singleton();
if (editor->get_editor_history()->get_current() == E->value()->get_instance_id()) {
if (editor->get_editor_history()->get_current() == E.value->get_instance_id()) {
editor->push_item(nullptr);
}
memdelete(E->value());
memdelete(E.value);
}
remote_objects.clear();
remote_dependencies.clear();