[bugfix]flexbuffers isvector bugfix (#5488)

* commit isvector bugfix (change email recommit to pass cla)

* commit IsUntypedVector

* delete isvectorormap function
This commit is contained in:
Earlonus
2019-08-24 01:51:36 +08:00
committed by Wouter van Oortmerssen
parent 4525c91be3
commit c11b5d7447

View File

@@ -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;