summaryrefslogtreecommitdiff
path: root/editor/filesystem_dock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/filesystem_dock.cpp')
-rw-r--r--editor/filesystem_dock.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 225eac36a5..daee61c2dd 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -135,7 +135,7 @@ bool FileSystemDock::_create_tree(TreeItem *p_parent, EditorFileSystemDirectory
_sort_file_info_list(file_list);
// Build the tree.
- for (FileInfo &fi : file_list) {
+ for (const FileInfo &fi : file_list) {
TreeItem *file_item = tree->create_item(subdirectory_item);
file_item->set_text(0, fi.name);
file_item->set_structured_text_bidi_override(0, STRUCTURED_TEXT_FILE);
@@ -964,7 +964,7 @@ void FileSystemDock::_select_file(const String &p_path, bool p_select_in_favorit
List<String> importer_exts;
ResourceImporterScene::get_singleton()->get_recognized_extensions(&importer_exts);
String extension = fpath.get_extension();
- for (String &E : importer_exts) {
+ for (const String &E : importer_exts) {
if (extension.nocasecmp_to(E) == 0) {
is_imported = true;
break;
@@ -1237,7 +1237,7 @@ void FileSystemDock::_update_resource_paths_after_move(const Map<String, String>
List<Ref<Resource>> cached;
ResourceCache::get_cached_resources(&cached);
- for (Ref<Resource> r : cached) {
+ for (Ref<Resource> &r : cached) {
String base_path = r->get_path();
String extra_path;
int sep_pos = r->get_path().find("::");
@@ -1413,7 +1413,7 @@ void FileSystemDock::_make_scene_confirm() {
ResourceSaver::get_recognized_extensions(sd, &extensions);
bool extension_correct = false;
- for (String &E : extensions) {
+ for (const String &E : extensions) {
if (E == extension) {
extension_correct = true;
break;