mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Use const references where possible for List range iterators
This commit is contained in:
parent
a0f7f42b84
commit
ac3322b0af
171 changed files with 649 additions and 650 deletions
|
@ -205,7 +205,7 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
|
|||
bool found = false;
|
||||
bool match = false;
|
||||
int index = 0;
|
||||
for (String &E : extensions) {
|
||||
for (const String &E : extensions) {
|
||||
if (E.nocasecmp_to(extension) == 0) {
|
||||
//FIXME (?) - changing language this way doesn't update controls, needs rework
|
||||
//language_menu->select(index); // change Language option by extension
|
||||
|
@ -373,7 +373,7 @@ void ScriptCreateDialog::_lang_changed(int l) {
|
|||
ScriptServer::get_language(m)->get_recognized_extensions(&extensions);
|
||||
}
|
||||
|
||||
for (String &E : extensions) {
|
||||
for (const String &E : extensions) {
|
||||
if (E.nocasecmp_to(extension) == 0) {
|
||||
path = path.get_basename() + selected_ext;
|
||||
_path_changed(path);
|
||||
|
@ -534,7 +534,7 @@ void ScriptCreateDialog::_browse_path(bool browse_parent, bool p_save) {
|
|||
int lang = language_menu->get_selected();
|
||||
ScriptServer::get_language(lang)->get_recognized_extensions(&extensions);
|
||||
|
||||
for (String &E : extensions) {
|
||||
for (const String &E : extensions) {
|
||||
file_browse->add_filter("*." + E);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue