]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix the type of a loop variable
authorMikko Rasa <tdb@tdb.fi>
Sun, 10 Oct 2021 08:51:54 +0000 (11:51 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 10 Oct 2021 10:54:56 +0000 (13:54 +0300)
This was a transcription error introduced in e9a898f.

source/glsl/spirv.cpp

index 233d15488dd043de95408e3642c075aba9d2d280..edbdf6359eeb8d751690f9e5d45923f9bac32fd9 100644 (file)
@@ -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;