projects
/
platform
/
upstream
/
SPIRV-Tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
677e0c7
)
Explicitly convert to narrower type.
author
David Neto
<dneto@google.com>
Tue, 5 Jan 2016 19:57:58 +0000
(14:57 -0500)
committer
David Neto
<dneto@google.com>
Wed, 6 Jan 2016 18:11:42 +0000
(13:11 -0500)
Fixes a strict Clang warning.
source/binary.cpp
patch
|
blob
|
history
diff --git
a/source/binary.cpp
b/source/binary.cpp
index
7a3ec35
..
94cbf9c
100755
(executable)
--- a/
source/binary.cpp
+++ b/
source/binary.cpp
@@
-769,7
+769,8
@@
spv_result_t Parser::setNumericTypeInfoForType(
parsed_operand->number_kind = info.type;
parsed_operand->number_bit_width = info.bit_width;
- parsed_operand->num_words = (info.bit_width + 31) / 32; // Round up
+ // Round up the word count.
+ parsed_operand->num_words = static_cast<uint16_t>((info.bit_width + 31) / 32);
return SPV_SUCCESS;
}