ui/map: assign the return value to `last_position` (#29341)

assign the return value directly to last_position
pull/29407/head
Dean Lee 2 years ago committed by GitHub
parent ae649ec68d
commit 613bbb7e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      selfdrive/ui/qt/maps/map.cc

@ -43,11 +43,7 @@ MapWindow::MapWindow(const QMapboxGLSettings &settings) : m_settings(settings),
overlay_layout->addStretch(1); overlay_layout->addStretch(1);
overlay_layout->addWidget(map_eta); overlay_layout->addWidget(map_eta);
auto last_gps_position = coordinate_from_param("LastGPSPosition"); last_position = coordinate_from_param("LastGPSPosition");
if (last_gps_position.has_value()) {
last_position = *last_gps_position;
}
grabGesture(Qt::GestureType::PinchGesture); grabGesture(Qt::GestureType::PinchGesture);
qDebug() << "MapWindow initialized"; qDebug() << "MapWindow initialized";
} }

Loading…
Cancel
Save