mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-01 19:58:15 +00:00
[bugfix]flexbuffers isvector bugfix (#5488)
* commit isvector bugfix (change email recommit to pass cla) * commit IsUntypedVector * delete isvectorormap function
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
4525c91be3
commit
c11b5d7447
@@ -378,12 +378,12 @@ class Reference {
|
||||
bool IsString() const { return type_ == FBT_STRING; }
|
||||
bool IsKey() const { return type_ == FBT_KEY; }
|
||||
bool IsVector() const { return type_ == FBT_VECTOR || type_ == FBT_MAP; }
|
||||
bool IsUntypedVector() const { return type_ == FBT_VECTOR; }
|
||||
bool IsTypedVector() const { return flexbuffers::IsTypedVector(type_); }
|
||||
bool IsFixedTypedVector() const { return flexbuffers::IsFixedTypedVector(type_); }
|
||||
bool IsAnyVector() const { return (IsTypedVector() || IsFixedTypedVector() || IsVector());}
|
||||
bool IsMap() const { return type_ == FBT_MAP; }
|
||||
bool IsBlob() const { return type_ == FBT_BLOB; }
|
||||
|
||||
bool AsBool() const {
|
||||
return (type_ == FBT_BOOL ? ReadUInt64(data_, parent_width_)
|
||||
: AsUInt64()) != 0;
|
||||
|
||||
Reference in New Issue
Block a user