]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix a signedness warning
authorMikko Rasa <tdb@tdb.fi>
Fri, 9 Apr 2021 14:08:16 +0000 (17:08 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 9 Apr 2021 14:45:42 +0000 (17:45 +0300)
source/core/module.cpp

index 374ef8ae4d71537fcfa36b37cdba910e63b7faf9..6f7fbdb93e9799dc488b7b10646c48cf2bc0c4ac 100644 (file)
@@ -303,7 +303,7 @@ void SpirVModule::Reflection::reflect_code(const vector<UInt32> &code)
        for(CodeIterator op=code.begin()+5; op!=code.end(); )
        {
                unsigned word_count = *op>>16;
-               if(word_count>code.end()-op)
+               if(word_count>static_cast<unsigned>(code.end()-op))
                        throw invalid_module("Truncated SPIR-V instruction");
 
                switch(get_opcode(*op))