Skip to content

Commit

Permalink
Use explicit iterator difference
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich committed Dec 9, 2024
1 parent c7a2ca2 commit 4016e26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions joint_trajectory_controller/src/trajectory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ bool Trajectory::sample(

interpolate_between_points(t0, point, t1, next_point, sample_time, output_state);
}
start_segment_itr = begin() + static_cast<std::ptrdiff_t>(i);
end_segment_itr = begin() + static_cast<std::ptrdiff_t>(i + 1);
start_segment_itr = begin() + static_cast<TrajectoryPointConstIter::difference_type>(i);
end_segment_itr = begin() + static_cast<TrajectoryPointConstIter::difference_type>(i + 1);
if (search_monotonically_increasing)
{
last_sample_idx_ = i;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ class TrajectoryControllerTest : public ::testing::Test
{
traj_msg.joint_names = {
joint_names_.begin(),
joint_names_.begin() + static_cast<std::ptrdiff_t>(points_positions[0].size())};
joint_names_.begin() +
static_cast<std::vector<std::string>::difference_type>(points_positions[0].size())};
}
else
{
Expand Down

0 comments on commit 4016e26

Please sign in to comment.