mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 05:47:36 +00:00
Mass Refactoring to use IsString and other BASE_TYPE helpers (#6193)
* Updated SupportsAdvancedUnionFeatures to look out for string * Mass refactoring to use BASE_TYPE helper functions. Co-authored-by: Casper Neo <cneo@google.com>
This commit is contained in:
@@ -87,7 +87,7 @@ enum FullType {
|
||||
FullType GetFullType(const Type &type) {
|
||||
// N.B. The order of these conditionals matters for some types.
|
||||
|
||||
if (type.base_type == BASE_TYPE_STRING) {
|
||||
if (IsString(type)) {
|
||||
return ftString;
|
||||
} else if (type.base_type == BASE_TYPE_STRUCT) {
|
||||
if (type.struct_def->fixed) {
|
||||
@@ -95,7 +95,7 @@ FullType GetFullType(const Type &type) {
|
||||
} else {
|
||||
return ftTable;
|
||||
}
|
||||
} else if (type.base_type == BASE_TYPE_VECTOR) {
|
||||
} else if (IsVector(type)) {
|
||||
switch (GetFullType(type.VectorType())) {
|
||||
case ftInteger: {
|
||||
return ftVectorOfInteger;
|
||||
|
||||
Reference in New Issue
Block a user