Add const references detected by clang-tidy

This commit is contained in:
Wilson E. Alvarez 2023-11-18 17:40:56 -05:00
parent 2d0ee20ff3
commit a3cb1b096f
No known key found for this signature in database
GPG key ID: A32174A3D2ED3F9E
57 changed files with 120 additions and 120 deletions

View file

@ -468,7 +468,7 @@ bool EditorPropertyArray::_is_drop_valid(const Dictionary &p_drag_data) const {
Vector<String> files = drag_data["files"];
for (int i = 0; i < files.size(); i++) {
String file = files[i];
const String &file = files[i];
String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
for (int j = 0; j < allowed_type.get_slice_count(","); j++) {
@ -510,7 +510,7 @@ void EditorPropertyArray::drop_data_fw(const Point2 &p_point, const Variant &p_d
// Loop the file array and add to existing array.
for (int i = 0; i < files.size(); i++) {
String file = files[i];
const String &file = files[i];
Ref<Resource> res = ResourceLoader::load(file);
if (res.is_valid()) {