diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-21 20:53:29 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-21 20:53:29 +0100 |
commit | c3539b4561f9b4d7dc4ba1c5859217e7fbf9c6fe (patch) | |
tree | a542b2eee67cae927a507eb3d8c2fafe01163310 /servers/rendering/renderer_rd/shader_rd.cpp | |
parent | c78153774212f432a89f512ff9d71312e23fe1ff (diff) | |
parent | 615c5170345b2b549be6271d11319a10a5ce34bf (diff) |
Merge pull request #70773 from KoBeWi/lector
Add range iterator to LocalVector
Diffstat (limited to 'servers/rendering/renderer_rd/shader_rd.cpp')
-rw-r--r-- | servers/rendering/renderer_rd/shader_rd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp index 2d5263a3e2..533a912a34 100644 --- a/servers/rendering/renderer_rd/shader_rd.cpp +++ b/servers/rendering/renderer_rd/shader_rd.cpp @@ -165,8 +165,7 @@ void ShaderRD::_clear_version(Version *p_version) { } void ShaderRD::_build_variant_code(StringBuilder &builder, uint32_t p_variant, const Version *p_version, const StageTemplate &p_template) { - for (uint32_t i = 0; i < p_template.chunks.size(); i++) { - const StageTemplate::Chunk &chunk = p_template.chunks[i]; + for (const StageTemplate::Chunk &chunk : p_template.chunks) { switch (chunk.type) { case StageTemplate::Chunk::TYPE_VERSION_DEFINES: { builder.append("\n"); //make sure defines begin at newline |