Skip to content

Commit b315f2b

Browse files
authored
Delete copy constructor and copy and move operators (#2378)
1 parent 7061ac4 commit b315f2b

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

hardware_interface/include/hardware_interface/actuator.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ class Actuator final
4545

4646
~Actuator() = default;
4747

48+
Actuator(const Actuator & other) = delete;
49+
50+
Actuator & operator=(const Actuator & other) = delete;
51+
52+
Actuator & operator=(Actuator && other) = delete;
53+
4854
[[deprecated(
4955
"Replaced by const rclcpp_lifecycle::State & initialize(const "
5056
"hardware_interface::HardwareComponentParams & params).")]]

hardware_interface/include/hardware_interface/sensor.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ class Sensor final
4545

4646
~Sensor() = default;
4747

48+
Sensor(const Sensor & other) = delete;
49+
50+
Sensor & operator=(const Sensor & other) = delete;
51+
52+
Sensor & operator=(Sensor && other) = delete;
53+
4854
[[deprecated(
4955
"Replaced by const rclcpp_lifecycle::State & initialize(const "
5056
"hardware_interface::HardwareComponentParams & params).")]]

hardware_interface/include/hardware_interface/system.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ class System final
4545

4646
~System() = default;
4747

48+
System(const System & other) = delete;
49+
50+
System & operator=(const System & other) = delete;
51+
52+
System & operator=(System && other) = delete;
53+
4854
[[deprecated(
4955
"Replaced by const rclcpp_lifecycle::State & initialize(const "
5056
"hardware_interface::HardwareComponentParams & params).")]]

0 commit comments

Comments
 (0)