Added reserve function before storing points in PointCloud in VoxelGr…#4938
Merged
mvieth merged 2 commits intoPointCloudLibrary:masterfrom Sep 25, 2021
Merged
Conversation
…idCovariance::getDisplayCloud. (PointCloudLibrary#4931)
kunaltyagi
previously approved these changes
Sep 23, 2021
Member
kunaltyagi
left a comment
There was a problem hiding this comment.
Just a minor point. LGTM otherwise
Thanks @KotaYonezawa san
| Eigen::Vector3d rand_point; | ||
| Eigen::Vector3d dist_point; | ||
|
|
||
| cell_cloud.reserve (pnt_per_cell * std::count_if (leaves_.begin (), leaves_.end (), [this] (auto& l) { return (l.second.nr_points >= min_points_per_voxel_); })); |
Member
There was a problem hiding this comment.
Should we break this in 2 lines?
Contributor
Author
There was a problem hiding this comment.
Thanks a lot for your comment.
I'm not so sure about PCL coding rule but is following fine?
cell_cloud.reserve (pnt_per_cell * std::count_if (leaves_.begin (), leaves_.end (),
[this] (auto& l) { return (l.second.nr_points >= min_points_per_voxel_); }));
f3cef13
Member
|
Closing and reopening to trigger CI ... it somehow didn't run after your last commit |
larshg
approved these changes
Sep 24, 2021
mvieth
approved these changes
Sep 24, 2021
mvieth
pushed a commit
to mvieth/pcl
that referenced
this pull request
Dec 27, 2021
PointCloudLibrary#4938) * Added reserve function before storing points in PointCloud in VoxelGridCovariance::getDisplayCloud. (PointCloudLibrary#4931) * Break in 2 lines.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added reserve function before storing points in PointCloud in VoxelGridCovariance::getDisplayCloud. (#4931)