Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy

Add const references detected by clang-tidy
This commit is contained in:
Rémi Verschelde 2024-01-04 14:25:33 +01:00
commit 6c390b620d
No known key found for this signature in database
GPG key ID: C3336907360768E1
57 changed files with 119 additions and 119 deletions

View file

@ -533,7 +533,7 @@ bool ShaderEditorPlugin::can_drop_data_fw(const Point2 &p_point, const Variant &
}
for (int i = 0; i < files.size(); i++) {
String file = files[i];
const String &file = files[i];
if (ResourceLoader::exists(file, "Shader")) {
Ref<Shader> shader = ResourceLoader::load(file);
if (shader.is_valid()) {
@ -574,7 +574,7 @@ void ShaderEditorPlugin::drop_data_fw(const Point2 &p_point, const Variant &p_da
Vector<String> files = d["files"];
for (int i = 0; i < files.size(); i++) {
String file = files[i];
const String &file = files[i];
Ref<Resource> res;
if (ResourceLoader::exists(file, "Shader") || ResourceLoader::exists(file, "ShaderInclude")) {
res = ResourceLoader::load(file);