General Codebase clean up (#5939)

* Fixed refractoring issue in reflection/generate_code.sh. Also, mv deletes the original file, so I don't need to clean it up manually in that case.

* Ensuring test/generate_code.sh was ran

* Fixed Dart Tests by removing code-gen for included files.

* General cleanup of codebase.
This commit is contained in:
Derek Bailey
2020-06-01 08:40:55 -07:00
committed by GitHub
parent a0da0c08c6
commit 7179a5a8ba
8 changed files with 34 additions and 42 deletions

View File

@@ -75,10 +75,8 @@ class CodeWriter {
void DecrementIdentLevel() {
if (cur_ident_lvl_) cur_ident_lvl_--;
}
void SetPadding(const std::string &padding) {
pad_ = padding;
}
void SetPadding(const std::string &padding) { pad_ = padding; }
private:
std::map<std::string, std::string> value_map_;

View File

@@ -587,7 +587,7 @@ static inline const char *GetCstring(const String *str) {
static inline flatbuffers::string_view GetStringView(const String *str) {
return str ? str->string_view() : flatbuffers::string_view();
}
#endif // FLATBUFFERS_HAS_STRING_VIEW
#endif // FLATBUFFERS_HAS_STRING_VIEW
// Allocator interface. This is flatbuffers-specific and meant only for
// `vector_downward` usage.
@@ -1803,7 +1803,8 @@ class FlatBufferBuilder {
return a.KeyCompareLessThan(&b);
}
FLATBUFFERS_DELETE_FUNC(StructKeyComparator &operator=(const StructKeyComparator &))
FLATBUFFERS_DELETE_FUNC(
StructKeyComparator &operator=(const StructKeyComparator &))
};
/// @endcond

View File

@@ -410,9 +410,7 @@ struct EnumDef : public Definition {
size_t size() const { return vals.vec.size(); }
const std::vector<EnumVal *> &Vals() const {
return vals.vec;
}
const std::vector<EnumVal *> &Vals() const { return vals.vec; }
const EnumVal *Lookup(const std::string &enum_name) const {
return vals.Lookup(enum_name);

View File

@@ -469,8 +469,7 @@ Offset<const Table *> CopyTable(FlatBufferBuilder &fbb,
// buf should point to the start of flatbuffer data.
// length specifies the size of the flatbuffer data.
bool Verify(const reflection::Schema &schema, const reflection::Object &root,
const uint8_t *buf, size_t length,
uoffset_t max_depth = 64,
const uint8_t *buf, size_t length, uoffset_t max_depth = 64,
uoffset_t max_tables = 1000000);
} // namespace flatbuffers