]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/module.cpp
Fix a signedness warning
[libs/gl.git] / 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))