From 53b73bb473fb8f115dd346becd2de584a86d29ec Mon Sep 17 00:00:00 2001 From: Balduin Date: Mon, 27 Apr 2026 11:34:02 +0200 Subject: [PATCH] fix(geofence_avoidance_planner): fix double-promotion clang-tidy warning Cast NAN to double when constructing Vector2d to avoid -Wdouble-promotion. --- .../GeofenceBreachAvoidance/geofence_avoidance_planner.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/navigator/GeofenceBreachAvoidance/geofence_avoidance_planner.h b/src/modules/navigator/GeofenceBreachAvoidance/geofence_avoidance_planner.h index 08de84c02e9..1a3b156fe80 100644 --- a/src/modules/navigator/GeofenceBreachAvoidance/geofence_avoidance_planner.h +++ b/src/modules/navigator/GeofenceBreachAvoidance/geofence_avoidance_planner.h @@ -70,7 +70,7 @@ struct PlannedPath { return points[current_index++]; } else { - return matrix::Vector2d{NAN, NAN}; + return matrix::Vector2d{(double)NAN, (double)NAN}; } } @@ -82,7 +82,7 @@ struct PlannedPath { return points[current_index]; } - return matrix::Vector2d{NAN, NAN}; + return matrix::Vector2d{(double)NAN, (double)NAN}; } };