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/starter/starter_rpc_lib.cc b/aos/starter/starter_rpc_lib.cc
index 230e1b1..b497792 100644
--- a/aos/starter/starter_rpc_lib.cc
+++ b/aos/starter/starter_rpc_lib.cc
@@ -155,9 +155,9 @@
if (is_multi_node) {
node_offsets.push_back(builder.fbb()->CreateString(node_name));
}
- const ApplicationStatus *last_status =
- CHECK_NOTNULL(FindApplicationStatus(*status_fetchers_[node_name],
- command.application));
+ const ApplicationStatus *last_status = FindApplicationStatus(
+ *status_fetchers_[node_name], command.application);
+ CHECK(last_status != nullptr);
current_commands_[node_name].push_back(CommandStatus{
.expected_state = ExpectedStateForCommand(command.command),
.application = std::string(command.application),
@@ -207,7 +207,8 @@
const Status &status = *status_fetchers_[pair.first];
for (const auto &command : pair.second) {
const ApplicationStatus *application_status =
- CHECK_NOTNULL(FindApplicationStatus(status, command.application));
+ FindApplicationStatus(status, command.application);
+ CHECK(application_status != nullptr);
if (application_status->state() == command.expected_state) {
if (command.expected_state == State::RUNNING &&
application_status->id() == command.old_id) {