From c53601d03ad66a41426f1ed71d53e7d883ac8c64 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Thu, 19 Dec 2024 23:50:00 +0100 Subject: [PATCH] Fix KDL_VERSION test --- .../src/path_circle_generator.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/moveit_planners/pilz_industrial_motion_planner/src/path_circle_generator.cpp b/moveit_planners/pilz_industrial_motion_planner/src/path_circle_generator.cpp index ca7faf118e..3d8f3ca0a6 100644 --- a/moveit_planners/pilz_industrial_motion_planner/src/path_circle_generator.cpp +++ b/moveit_planners/pilz_industrial_motion_planner/src/path_circle_generator.cpp @@ -32,7 +32,9 @@ * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ +#include #include "pilz_industrial_motion_planner/path_circle_generator.h" +#define KDL_VERSION_LESS(a, b, c) ((KDL_VERSION) < ((a << 16) | (b << 8) | c)) namespace pilz_industrial_motion_planner { @@ -65,9 +67,8 @@ std::unique_ptr PathCircleGenerator::circleFromCenter(const KDL::Fram } catch (KDL::Error_MotionPlanning&) { -#if KDL_VERSION < ((1 << 16) | (4 << 8) | 1) // older than 1.4.1 ? - delete rot_interpo; // in case we could not construct the Path object, - // avoid a memory leak +#if KDL_VERSION_LESS(1, 4, 1) // older than 1.4.1 ? + delete rot_interpo; // in case we could not construct the Path object, avoid a memory leak #endif KDL::epsilon = old_kdl_epsilon; throw; // and pass the exception on to the caller @@ -134,9 +135,8 @@ std::unique_ptr PathCircleGenerator::circleFromInterim(const KDL::Fra // above, // we keep these lines to be safe { -#if KDL_VERSION < ((1 << 16) | (4 << 8) | 1) // older than 1.4.1 ? - delete rot_interpo; // in case we could not construct the Path object, - // avoid a memory leak +#if KDL_VERSION_LESS(1, 4, 1) // older than 1.4.1 ? + delete rot_interpo; // in case we could not construct the Path object, avoid a memory leak #endif throw; // and pass the exception on to the caller // LCOV_EXCL_STOP