mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 10:12:18 +00:00
inline initialize byte_width
This commit is contained in:
@@ -383,9 +383,10 @@ class Reference {
|
|||||||
type_(type) {}
|
type_(type) {}
|
||||||
|
|
||||||
Reference(const uint8_t *data, uint8_t parent_width, uint8_t packed_type)
|
Reference(const uint8_t *data, uint8_t parent_width, uint8_t packed_type)
|
||||||
: data_(data), parent_width_(parent_width) {
|
: data_(data),
|
||||||
byte_width_ = static_cast<BitWidth>(1U << (packed_type & 3));
|
parent_width_(parent_width),
|
||||||
type_ = static_cast<Type>(packed_type >> 2);
|
byte_width_(1 << (packed_type & 3)),
|
||||||
|
type_(static_cast<Type>(packed_type >> 2)) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Type GetType() const { return type_; }
|
Type GetType() const { return type_; }
|
||||||
|
|||||||
Reference in New Issue
Block a user