mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-10 06:17:26 +08:00
fix(geofence_avoidance_planner): fix double-promotion clang-tidy warning
Cast NAN to double when constructing Vector2d to avoid -Wdouble-promotion.
This commit is contained in:
@@ -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};
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user