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

@ -517,7 +517,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()) {
@ -558,7 +558,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);