mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
This commit is contained in:
parent
7ebc866418
commit
955d5affa8
103 changed files with 877 additions and 849 deletions
|
@ -1275,8 +1275,8 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||
List<String> extensions;
|
||||
ResourceLoader::get_recognized_extensions_for_type("Script", &extensions);
|
||||
file_dialog->clear_filters();
|
||||
for (int i = 0; i < extensions.size(); i++) {
|
||||
file_dialog->add_filter("*." + extensions[i], extensions[i].to_upper());
|
||||
for (const String &extension : extensions) {
|
||||
file_dialog->add_filter("*." + extension, extension.to_upper());
|
||||
}
|
||||
|
||||
for (const String &E : textfile_extensions) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue