summaryrefslogtreecommitdiffstats
path: root/servers/rendering/shader_compiler.cpp
diff options
context:
space:
mode:
authorWilson E. Alvarez <wilson.e.alvarez@rubonnek.com>2023-11-18 17:40:56 -0500
committerWilson E. Alvarez <wilson.e.alvarez@rubonnek.com>2023-12-16 13:36:44 -0500
commita3cb1b096fcecad03562205bd285ebefc816c64a (patch)
tree3966ab0682c6269c60de7b438d51b30ae164ffde /servers/rendering/shader_compiler.cpp
parent2d0ee20ff30461b6b10f6fdfba87511a0ebc6642 (diff)
downloadredot-engine-a3cb1b096fcecad03562205bd285ebefc816c64a.tar.gz
Add const references detected by clang-tidy
Diffstat (limited to 'servers/rendering/shader_compiler.cpp')
-rw-r--r--servers/rendering/shader_compiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/rendering/shader_compiler.cpp b/servers/rendering/shader_compiler.cpp
index 1e95cdde0c..6404b5002d 100644
--- a/servers/rendering/shader_compiler.cpp
+++ b/servers/rendering/shader_compiler.cpp
@@ -543,7 +543,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
uniform_names.sort_custom<StringName::AlphCompare>(); //ensure order is deterministic so the same shader is always produced
for (int k = 0; k < uniform_names.size(); k++) {
- StringName uniform_name = uniform_names[k];
+ const StringName &uniform_name = uniform_names[k];
const SL::ShaderNode::Uniform &uniform = pnode->uniforms[uniform_name];
String ucode;
@@ -670,7 +670,7 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
varying_names.sort_custom<StringName::AlphCompare>(); //ensure order is deterministic so the same shader is always produced
for (int k = 0; k < varying_names.size(); k++) {
- StringName varying_name = varying_names[k];
+ const StringName &varying_name = varying_names[k];
const SL::ShaderNode::Varying &varying = pnode->varyings[varying_name];
if (varying.stage == SL::ShaderNode::Varying::STAGE_FRAGMENT_TO_LIGHT || varying.stage == SL::ShaderNode::Varying::STAGE_FRAGMENT) {