From c910761e96d0e9249832eff917ebc1c082d28165 Mon Sep 17 00:00:00 2001 From: Sai Kishor Kothakota Date: Wed, 4 Dec 2024 11:55:18 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Bence Magyar --- joint_limits/CMakeLists.txt | 4 ++-- joint_limits/src/joint_saturation_limiter.cpp | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/joint_limits/CMakeLists.txt b/joint_limits/CMakeLists.txt index f88e308b21..9729087e7f 100644 --- a/joint_limits/CMakeLists.txt +++ b/joint_limits/CMakeLists.txt @@ -108,7 +108,7 @@ if(BUILD_TESTING) rclcpp ) - ament_add_gtest(test_joint_range_limiter test/test_joint_range_limiter.cpp) + ament_add_gmock(test_joint_range_limiter test/test_joint_range_limiter.cpp) target_include_directories(test_joint_range_limiter PRIVATE include) target_link_libraries(test_joint_range_limiter joint_limiter_interface) ament_target_dependencies( @@ -117,7 +117,7 @@ if(BUILD_TESTING) rclcpp ) - ament_add_gtest(test_joint_soft_limiter test/test_joint_soft_limiter.cpp) + ament_add_gmock(test_joint_soft_limiter test/test_joint_soft_limiter.cpp) target_include_directories(test_joint_soft_limiter PRIVATE include) target_link_libraries(test_joint_soft_limiter joint_limiter_interface) ament_target_dependencies( diff --git a/joint_limits/src/joint_saturation_limiter.cpp b/joint_limits/src/joint_saturation_limiter.cpp index 65d966ce5f..ad91793dac 100644 --- a/joint_limits/src/joint_saturation_limiter.cpp +++ b/joint_limits/src/joint_saturation_limiter.cpp @@ -433,10 +433,8 @@ bool JointSaturationLimiter::on_enfo // typedefs are needed here to avoid issues with macro expansion. ref: // https://stackoverflow.com/a/8942986 -typedef std::map int_map; -typedef joint_limits::JointSaturationLimiter - JointTrajectoryPointSaturationLimiter; -typedef joint_limits::JointLimiterInterface - JointTrajectoryPointLimiterInterfaceBase; +using int_map = std::map; +using JointTrajectoryPointSaturationLimiter = joint_limits::JointSaturationLimiter; +using JointTrajectoryPointLimiterInterfaceBase = joint_limits::JointLimiterInterface; PLUGINLIB_EXPORT_CLASS( JointTrajectoryPointSaturationLimiter, JointTrajectoryPointLimiterInterfaceBase)