forked from BigfootDev/flatbuffers
Add a FileWriter interface (#7821)
* Add a FileWriter interface * Change interface * Provide 2 impl for File interface: FileManager & FileNameManager * Update * update * Update * Add file_writer file * Update * Format files * Update based on review * Update * Format bzl file * Add LoadFile function * Format --------- Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -1424,12 +1424,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:
|
||||
|
||||
Reference in New Issue
Block a user