Skip to content

Commit

Permalink
use emplace instead of push (#6121)
Browse files Browse the repository at this point in the history
* use emplace instead of push

* Fix syntax to use emplace instead of push

Co-authored-by: Markus Vieth <39675748+mvieth@users.noreply.github.com>

---------

Co-authored-by: Markus Vieth <39675748+mvieth@users.noreply.github.com>
  • Loading branch information
DIlkhush00 and mvieth authored Sep 3, 2024
1 parent d0ec11d commit da62355
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ pcl::RegionGrowingRGB<PointT, NormalT>::findRegionsKNN (pcl::index_t index, pcl:
{
if (distances[i_seg] < max_dist)
{
segment_neighbours.push (std::make_pair (distances[i_seg], i_seg) );
segment_neighbours.emplace (distances[i_seg], i_seg);
if (segment_neighbours.size () > nghbr_number)
segment_neighbours.pop ();
}
Expand Down

0 comments on commit da62355

Please sign in to comment.