Ran clang-format-all.sh. Removed default --style=file parameter (#6639)

* Ran clang-format-all.sh. Removed default --style=file parameter

* Moved scripts to scripts/ location
This commit is contained in:
Derek Bailey
2021-05-15 12:54:08 -07:00
committed by GitHub
parent f83ee1af59
commit ef0eb3701d
14 changed files with 65 additions and 67 deletions

View File

@@ -1397,12 +1397,10 @@ class Builder FLATBUFFERS_FINAL_CLASS {
template<typename T> static Type GetScalarType() {
static_assert(flatbuffers::is_scalar<T>::value, "Unrelated types");
return flatbuffers::is_floating_point<T>::value
? FBT_FLOAT
: flatbuffers::is_same<T, bool>::value
? FBT_BOOL
: (flatbuffers::is_unsigned<T>::value ? FBT_UINT
: FBT_INT);
return flatbuffers::is_floating_point<T>::value ? FBT_FLOAT
: flatbuffers::is_same<T, bool>::value
? FBT_BOOL
: (flatbuffers::is_unsigned<T>::value ? FBT_UINT : FBT_INT);
}
public:

View File

@@ -307,15 +307,9 @@ struct FieldDef : public Definition {
bool IsScalarOptional() const {
return IsScalar(value.type.base_type) && IsOptional();
}
bool IsOptional() const {
return presence == kOptional;
}
bool IsRequired() const {
return presence == kRequired;
}
bool IsDefault() const {
return presence == kDefault;
}
bool IsOptional() const { return presence == kOptional; }
bool IsRequired() const { return presence == kRequired; }
bool IsDefault() const { return presence == kDefault; }
Value value;
bool deprecated; // Field is allowed to be present in old data, but can't be.