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/y2023/joystick_reader.cc b/y2023/joystick_reader.cc
index 45418bc..6e62c5b 100644
--- a/y2023/joystick_reader.cc
+++ b/y2023/joystick_reader.cc
@@ -533,7 +533,8 @@
auto builder = target_selector_hint_sender_.MakeBuilder();
auto hint_builder = builder.MakeBuilder<TargetSelectorHint>();
hint_builder.add_substation_pickup(true);
- hint_builder.add_robot_side(CHECK_NOTNULL(current_setpoint_)->side);
+ CHECK(current_setpoint_ != nullptr);
+ hint_builder.add_robot_side(current_setpoint_->side);
if (builder.Send(hint_builder.Finish()) != aos::RawSender::Error::kOk) {
AOS_LOG(ERROR, "Sending target selector hint failed.\n");
}
@@ -542,7 +543,8 @@
auto hint_builder = builder.MakeBuilder<TargetSelectorHint>();
hint_builder.add_row(placing_row.value());
hint_builder.add_spot(placing_spot.value());
- hint_builder.add_robot_side(CHECK_NOTNULL(current_setpoint_)->side);
+ CHECK(current_setpoint_ != nullptr);
+ hint_builder.add_robot_side(current_setpoint_->side);
if (builder.Send(hint_builder.Finish()) != aos::RawSender::Error::kOk) {
AOS_LOG(ERROR, "Sending target selector hint failed.\n");
}