mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-27 18:30:14 +00:00
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:
parent
fe24e0316f
commit
e9e4393b1c
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user