void SpirVModule::Reflection::reflect_constant(CodeIterator op)
{
+ unsigned opcode = get_opcode(*op);
unsigned id = *(op+2);
Constant &cnst = constants[id];
cnst.name = names[id];
cnst.type = types[*(op+1)].type;
- if(*op==OP_CONSTANT_TRUE || *op==OP_SPEC_CONSTANT_TRUE)
+ if(opcode==OP_CONSTANT_TRUE || opcode==OP_SPEC_CONSTANT_TRUE)
cnst.i_value = true;
- else if(*op==OP_CONSTANT_FALSE || *op==OP_SPEC_CONSTANT_FALSE)
+ else if(opcode==OP_CONSTANT_FALSE || opcode==OP_SPEC_CONSTANT_FALSE)
cnst.i_value = false;
else if(cnst.type==INT || cnst.type==UNSIGNED_INT)
cnst.i_value = *(op+3);