Skip to content

Commit b461692

Browse files
committed
Use const keyword for interface lists
1 parent 30fc66e commit b461692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ur_robot_driver/src/hardware_interface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ hardware_interface::return_type URPositionHardwareInterface::prepare_command_mod
11561156
// Modes that are not directly mapped to a single joint such as force_mode reserve all joints.
11571157
for (const auto& key : start_interfaces) {
11581158
for (auto i = 0u; i < info_.joints.size(); i++) {
1159-
std::vector<std::pair<std::string, std::string>> start_modes_to_check{
1159+
const std::vector<std::pair<std::string, std::string>> start_modes_to_check{
11601160
{ info_.joints[i].name + "/" + hardware_interface::HW_IF_POSITION, hardware_interface::HW_IF_POSITION },
11611161
{ info_.joints[i].name + "/" + hardware_interface::HW_IF_VELOCITY, hardware_interface::HW_IF_VELOCITY },
11621162
{ tf_prefix + FORCE_MODE_GPIO + "/type", FORCE_MODE_GPIO },
@@ -1187,7 +1187,7 @@ hardware_interface::return_type URPositionHardwareInterface::prepare_command_mod
11871187
// add stop interface per joint in tmp var for later check
11881188
for (const auto& key : stop_interfaces) {
11891189
for (auto i = 0u; i < info_.joints.size(); i++) {
1190-
std::vector<std::tuple<std::string, std::string, StoppingInterface>> stop_modes_to_check{
1190+
const std::vector<std::tuple<std::string, std::string, StoppingInterface>> stop_modes_to_check{
11911191
{ info_.joints[i].name + "/" + hardware_interface::HW_IF_POSITION, hardware_interface::HW_IF_POSITION,
11921192
StoppingInterface::STOP_POSITION },
11931193
{ info_.joints[i].name + "/" + hardware_interface::HW_IF_VELOCITY, hardware_interface::HW_IF_VELOCITY,

0 commit comments

Comments
 (0)