Skip to content

Commit dd0bf8c

Browse files
committed
Add using for simplification
1 parent 00475d7 commit dd0bf8c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

joint_trajectory_controller/include/joint_trajectory_controller/joint_trajectory_controller.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,11 @@ class JointTrajectoryController : public controller_interface::ControllerInterfa
127127
// The interfaces are defined as the types in 'allowed_interface_types_' member.
128128
// For convenience, for each type the interfaces are ordered so that i-th position
129129
// matches i-th index in joint_names_
130-
std::vector<std::vector<std::reference_wrapper<hardware_interface::LoanedCommandInterface>>>
131-
joint_command_interface_;
132-
std::vector<std::vector<std::reference_wrapper<hardware_interface::LoanedStateInterface>>>
133-
joint_state_interface_;
130+
template<typename T>
131+
using InterfaceReferences = std::vector<std::vector<std::reference_wrapper<T>>>;
132+
133+
InterfaceReferences<hardware_interface::LoanedCommandInterface> joint_command_interface_;
134+
InterfaceReferences<hardware_interface::LoanedStateInterface> joint_state_interface_;
134135

135136
bool has_velocity_state_interface_ = false;
136137
bool has_acceleration_state_interface_ = false;

0 commit comments

Comments
 (0)