Fix Visual Studio size_t cast compiler warning

Visual Studio was complaining about possible loss of data on 64-bit
builds, due to an implicit cast from size_t to int. This changes the
data to use an int with no cast.
This commit is contained in:
Lenny Komow 2017-07-13 11:13:14 -06:00
parent fe24e0316f
commit e9e4393b1c

View File

@ -1367,7 +1367,7 @@ spv_result_t MarkvDecoder::DecodeInstruction(spv_parsed_instruction_t* inst) {
assert(inst->num_words == std::accumulate(
parsed_operands_.begin(), parsed_operands_.end(), 1,
[](size_t num_words, const spv_parsed_operand_t& operand) {
[](int num_words, const spv_parsed_operand_t& operand) {
return num_words += operand.num_words;
}) && "num_words in instruction doesn't correspond to the sum of num_words"
"in the operands");