From 98c1fa7e4f6138636828d437c87ace349280a481 Mon Sep 17 00:00:00 2001 From: David Rajaratnam Date: Tue, 9 Feb 2016 10:31:31 +1100 Subject: [PATCH] Fixed use of non-standard C++ syntax for variable length arrays. Failed to compile under clang --- baxter_sim_controllers/src/baxter_effort_controller.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/baxter_sim_controllers/src/baxter_effort_controller.cpp b/baxter_sim_controllers/src/baxter_effort_controller.cpp index 8d4e226..90b85fe 100644 --- a/baxter_sim_controllers/src/baxter_effort_controller.cpp +++ b/baxter_sim_controllers/src/baxter_effort_controller.cpp @@ -87,7 +87,9 @@ bool BaxterEffortController::init( } // Get joint names from the parameter server - std::string joint_name[n_joints_]; + // FIX: Initialising arrays with a variable for the length is a GCC extension and not standard C++ + // std::string joint_name[n_joints_]; + std::vector joint_name = std::vector(n_joints_); // Get joint controller name std::string joint_controller_name = joint_it->first;