From 615c5170345b2b549be6271d11319a10a5ce34bf Mon Sep 17 00:00:00 2001 From: kobewi Date: Thu, 29 Dec 2022 01:24:45 +0100 Subject: Use range iterators in LocalVector loops --- servers/rendering/renderer_rd/shader_rd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'servers/rendering/renderer_rd/shader_rd.cpp') 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 -- cgit v1.2.3