Skip to content

Commit 351dc0b

Browse files
committed
Replace const with constexpr
Signed-off-by: Kacper Dąbrowski <[email protected]>
1 parent 27fca76 commit 351dc0b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ros2_ws/src/robotic_manipulation/src/arm_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bool ArmController::MoveThroughWaypoints(
6666
std::vector<geometry_msgs::msg::Pose> const &waypoints) {
6767
auto logger = m_node->get_logger();
6868

69-
int const NumTries = 10;
69+
int constexpr NumTries = 10;
7070
for (int i = 0; i < NumTries; i++) {
7171
moveit_msgs::msg::RobotTrajectory trajectory;
7272
if (m_pandaArm->computeCartesianPath(waypoints, 0.01, 0.0, trajectory) ==

ros2_ws/src/robotic_manipulation/src/rai_manipulation_interface_node.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ void RaiManipulationInterfaceNode::Initialize(ArmController &arm) {
8181
auto currentPose = arm.GetEffectorPose();
8282
auto aboveCurrent = currentPose;
8383
auto calculateZAboveTarget = [&](double targetZ) {
84-
double const MinimumZ = 0.3;
85-
double const MaximumZ = 0.4;
86-
double const ZOffset = 0.1;
84+
double constexpr MinimumZ = 0.3;
85+
double constexpr MaximumZ = 0.4;
86+
double constexpr ZOffset = 0.1;
8787

8888
return min(MaximumZ, max(targetZ + ZOffset, MinimumZ));
8989
};

0 commit comments

Comments
 (0)