diff --git a/include/flatbuffers/flexbuffers.h b/include/flatbuffers/flexbuffers.h index 79cdd9c5d62..838f94be539 100644 --- a/include/flatbuffers/flexbuffers.h +++ b/include/flatbuffers/flexbuffers.h @@ -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(packed_type & 3); + byte_width_ = static_cast(1U << (packed_type & 3)); type_ = static_cast(packed_type >> 2); }