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:
Casper
2020-10-20 08:00:31 -07:00
committed by GitHub
parent 8f6fa4b715
commit fe8e3c7e5d
15 changed files with 125 additions and 128 deletions

View File

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