From 7261faef70cf06dcc271a7de725ed040243fff5c Mon Sep 17 00:00:00 2001 From: royjr Date: Mon, 9 Mar 2026 20:33:45 -0400 Subject: [PATCH] Revert "Update routes.cc" This reverts commit 21935c243179d37b9009f1421648ec0c45306a17. --- tools/cabana/streams/routes.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/cabana/streams/routes.cc b/tools/cabana/streams/routes.cc index d94ccfa8d6..8539a00b5b 100644 --- a/tools/cabana/streams/routes.cc +++ b/tools/cabana/streams/routes.cc @@ -74,9 +74,7 @@ RoutesDialog::RoutesDialog(QWidget *parent) : QDialog(parent) { QPointer self = this; QtConcurrent::run([self]() { std::string result = PyDownloader::getDevices(); - auto response = checkApiResponse(result); - bool success = response.first; - int error_code = response.second; + auto [success, error_code] = checkApiResponse(result); QMetaObject::invokeMethod(qApp, [self, r = QString::fromStdString(result), success, error_code]() { if (self) self->parseDeviceList(r, success, error_code); }, Qt::QueuedConnection); @@ -119,9 +117,7 @@ void RoutesDialog::fetchRoutes() { QtConcurrent::run([self, did, start_ms, end_ms, preserved, request_id]() { std::string result = PyDownloader::getDeviceRoutes(did, start_ms, end_ms, preserved); if (!self || self->fetch_id_ != request_id) return; - auto response = checkApiResponse(result); - bool success = response.first; - int error_code = response.second; + auto [success, error_code] = checkApiResponse(result); QMetaObject::invokeMethod(qApp, [self, r = QString::fromStdString(result), success, error_code, request_id]() { if (self && self->fetch_id_ == request_id) self->parseRouteList(r, success, error_code); }, Qt::QueuedConnection);