]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/module.cpp
Fix a signedness warning
[libs/gl.git] / source / core / module.cpp
index 5287ae9c2ec369bbdfcf80242c738e4e2fdc75cf..6f7fbdb93e9799dc488b7b10646c48cf2bc0c4ac 100644 (file)
@@ -70,6 +70,7 @@ void GlslModule::compile(SL::Compiler &compiler)
        compiler.compile(SL::Compiler::MODULE);
        prepared_source = compiler.get_combined_glsl();
        source_map = compiler.get_source_map();
+
 #ifdef DEBUG
        string diagnostics = compiler.get_diagnostics();
        if(!diagnostics.empty())
@@ -302,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))