From 613bbb7e6da40b313dea86af9bfae71c057b375d Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Tue, 15 Aug 2023 07:39:43 +0800 Subject: [PATCH] ui/map: assign the return value to `last_position` (#29341) assign the return value directly to last_position --- selfdrive/ui/qt/maps/map.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/selfdrive/ui/qt/maps/map.cc b/selfdrive/ui/qt/maps/map.cc index c971bf9c0b..7487df8bcc 100644 --- a/selfdrive/ui/qt/maps/map.cc +++ b/selfdrive/ui/qt/maps/map.cc @@ -43,11 +43,7 @@ MapWindow::MapWindow(const QMapboxGLSettings &settings) : m_settings(settings), overlay_layout->addStretch(1); overlay_layout->addWidget(map_eta); - auto last_gps_position = coordinate_from_param("LastGPSPosition"); - if (last_gps_position.has_value()) { - last_position = *last_gps_position; - } - + last_position = coordinate_from_param("LastGPSPosition"); grabGesture(Qt::GestureType::PinchGesture); qDebug() << "MapWindow initialized"; }