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

Do not use Dictionary::keys() for Dictionary iteration.

This commit is contained in:
Yufeng Ying
2025-03-21 20:06:01 +08:00
parent 4b36c0491e
commit 8ae16699c5
18 changed files with 78 additions and 102 deletions

View File

@@ -54,10 +54,9 @@ void OpenXRSelectRuntime::_update_items() {
set_item_metadata(index, "");
index++;
Array keys = runtimes.keys();
for (int i = 0; i < keys.size(); i++) {
String key = keys[i];
String path = runtimes[key];
for (const KeyValue<Variant, Variant> &kv : runtimes) {
const String &key = kv.key;
const String &path = kv.value;
String adj_path = path.replace("~", home_folder);
if (da->file_exists(adj_path)) {