Skip to content

Commit

Permalink
Removing warning from memcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
kunaltyagi committed Sep 26, 2019
1 parent b40ee02 commit 70ff91e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filters/src/crop_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pcl::CropBox<pcl::PCLPointCloud2>::applyFilter (PCLPointCloud2 &output)
// Get local point
int point_offset = ((*indices_)[index] * input_->point_step);
int offset = point_offset + input_->fields[x_idx_].offset;
memcpy (&local_pt, &input_->data[offset], sizeof (float)*3);
memcpy (local_pt.data (), &input_->data[offset], sizeof (float)*3);

// Check if the point is invalid
if (!std::isfinite (local_pt.x ()) ||
Expand Down Expand Up @@ -170,7 +170,7 @@ pcl::CropBox<pcl::PCLPointCloud2>::applyFilter (std::vector<int> &indices)
// Get local point
int point_offset = ((*indices_)[index] * input_->point_step);
int offset = point_offset + input_->fields[x_idx_].offset;
memcpy (&local_pt, &input_->data[offset], sizeof (float)*3);
memcpy (local_pt.data (), &input_->data[offset], sizeof (float)*3);

// Transform point to world space
if (!transform_matrix_is_identity)
Expand Down

0 comments on commit 70ff91e

Please sign in to comment.