forked from BigfootDev/flatbuffers
fix: byte_width_ = 1U << static_cast<BitWidth>(packed_type & 3) implicit conversion loses integer precision: 'unsigned int' to 'uint8_t' (aka 'unsigned char') [-Werror,-Wimplicit-int-conversion] (#7697)
Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -384,7 +384,7 @@ class Reference {
|
||||
|
||||
Reference(const uint8_t *data, uint8_t parent_width, uint8_t packed_type)
|
||||
: data_(data), parent_width_(parent_width) {
|
||||
byte_width_ = 1U << static_cast<BitWidth>(packed_type & 3);
|
||||
byte_width_ = static_cast<BitWidth>(1U << (packed_type & 3));
|
||||
type_ = static_cast<Type>(packed_type >> 2);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user