From: Mikko Rasa Date: Sun, 10 Oct 2021 08:51:54 +0000 (+0300) Subject: Fix the type of a loop variable X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=34d956d6890ce7070741667d4864fa798883da72;p=libs%2Fgl.git Fix the type of a loop variable This was a transcription error introduced in e9a898f. --- diff --git a/source/glsl/spirv.cpp b/source/glsl/spirv.cpp index 233d1548..edbdf635 100644 --- a/source/glsl/spirv.cpp +++ b/source/glsl/spirv.cpp @@ -570,7 +570,7 @@ void SpirVGenerator::generate_composite_access(TypeDeclaration &result_type) throw internal_error("assignment to temporary composite"); else { - for(unsigned i: r_composite_chain) + for(unsigned &i: r_composite_chain) for(auto j=constant_ids.begin(); (i>=0x400000 && j!=constant_ids.end()); ++j) if(j->second==(i&0x3FFFFF)) i = j->first.int_value;