X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fmodule.cpp;h=6f7fbdb93e9799dc488b7b10646c48cf2bc0c4ac;hb=577a93f39f9b4d0f5101cd2f539fc774e7b06825;hp=5287ae9c2ec369bbdfcf80242c738e4e2fdc75cf;hpb=7af200475facc657a0bbffaa17520d3ec9d809af;p=libs%2Fgl.git diff --git a/source/core/module.cpp b/source/core/module.cpp index 5287ae9c..6f7fbdb9 100644 --- a/source/core/module.cpp +++ b/source/core/module.cpp @@ -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 &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(code.end()-op)) throw invalid_module("Truncated SPIR-V instruction"); switch(get_opcode(*op))