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/ipc_lib/memory_estimation.cc b/aos/ipc_lib/memory_estimation.cc
index d193c75..b64cb3a 100644
--- a/aos/ipc_lib/memory_estimation.cc
+++ b/aos/ipc_lib/memory_estimation.cc
@@ -5,7 +5,10 @@
size_t TotalSharedMemoryUsage(const aos::Configuration *config,
const aos::Node *node) {
size_t total_size = 0;
- for (const aos::Channel *channel : *CHECK_NOTNULL(config->channels())) {
+ const flatbuffers::Vector<flatbuffers::Offset<aos::Channel>> *channels =
+ config->channels();
+ CHECK(channels != nullptr);
+ for (const aos::Channel *channel : *channels) {
if (aos::configuration::ChannelIsReadableOnNode(channel, node)) {
total_size +=
LocklessQueueMemorySize(MakeQueueConfiguration(config, channel));