Remove usage of CHECK_NOTNULL
We want to switch to absl logging instead of glog. gtest and ceres are
going there, and we already have absl as a dependency. ABSL doesn't
have CHECK_NOTNULL, and we can move things over in an easier to review
fashion.
Change-Id: Ifd9a11ec34a2357cec43f88dba015db9c28ed2cf
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/aos/flatbuffer_utils.cc b/aos/flatbuffer_utils.cc
index 5abe676..afa1cb4 100644
--- a/aos/flatbuffer_utils.cc
+++ b/aos/flatbuffer_utils.cc
@@ -6,6 +6,33 @@
namespace aos {
+FlatbufferType::FlatbufferType(const flatbuffers::TypeTable *type_table) {
+ CHECK(type_table != nullptr);
+ type_table_ = type_table;
+}
+FlatbufferType::FlatbufferType(const reflection::Schema *schema) {
+ CHECK(schema != nullptr);
+ schema_ = schema;
+ DCHECK(schema->root_table() != nullptr);
+ object_ = schema->root_table();
+}
+
+FlatbufferType::FlatbufferType(const reflection::Schema *schema,
+ const reflection::Object *object) {
+ CHECK(schema != nullptr);
+ schema_ = schema;
+ DCHECK(object != nullptr);
+ object_ = object;
+}
+
+FlatbufferType::FlatbufferType(const reflection::Schema *schema,
+ const reflection::Enum *fb_enum) {
+ CHECK(schema != nullptr);
+ schema_ = schema;
+ CHECK(fb_enum != nullptr);
+ enum_ = fb_enum;
+}
+
bool FlatbufferType::IsSequence() const {
if (type_table_) {
return type_table_->st != flatbuffers::ST_ENUM;