mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Do not use Dictionary::keys() for Dictionary iteration.
This commit is contained in:
parent
4b36c0491e
commit
8ae16699c5
18 changed files with 78 additions and 102 deletions
|
|
@ -708,11 +708,11 @@ void EditorAssetLibrary::_update_repository_options() {
|
|||
default_urls["godotengine.org (Official)"] = "https://godotengine.org/asset-library/api";
|
||||
Dictionary available_urls = _EDITOR_DEF("asset_library/available_urls", default_urls, true);
|
||||
repository->clear();
|
||||
Array keys = available_urls.keys();
|
||||
for (int i = 0; i < keys.size(); i++) {
|
||||
String key = keys[i];
|
||||
repository->add_item(key);
|
||||
repository->set_item_metadata(i, available_urls[key]);
|
||||
int i = 0;
|
||||
for (const KeyValue<Variant, Variant> &kv : available_urls) {
|
||||
repository->add_item(kv.key);
|
||||
repository->set_item_metadata(i, kv.value);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue