Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
SiarheiFedartsou committed Jun 16, 2024
1 parent 0d55e1d commit 3070562
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/util/static_rtree.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ class StaticRTree

traversal_queue.clear();
// initialize queue with root element
traversal_queue.push_back(QueryCandidate{0, TreeIndex{}});
traversal_queue.emplace_back(QueryCandidate{0, TreeIndex{}});
std::push_heap(traversal_queue.begin(), traversal_queue.end());

while (!traversal_queue.empty())
Expand Down Expand Up @@ -717,10 +717,10 @@ class StaticRTree
BOOST_ASSERT(0. <= squared_distance);
BOOST_ASSERT(i < std::numeric_limits<std::uint32_t>::max());

traversal_queue.push_back(QueryCandidate{squared_distance,
leaf_id,
static_cast<std::uint32_t>(i),
Coordinate{projected_nearest}});
traversal_queue.emplace_back(QueryCandidate{squared_distance,
leaf_id,
static_cast<std::uint32_t>(i),
Coordinate{projected_nearest}});
std::push_heap(traversal_queue.begin(), traversal_queue.end());
}
}
Expand Down Expand Up @@ -750,7 +750,7 @@ class StaticRTree
child.minimum_bounding_rectangle.GetMinSquaredDist(
fixed_projected_input_coordinate);

traversal_queue.push_back(QueryCandidate{
traversal_queue.emplace_back(QueryCandidate{
squared_lower_bound_to_element,
TreeIndex(parent.level + 1, child_index - m_tree_level_starts[parent.level + 1])});
std::push_heap(traversal_queue.begin(), traversal_queue.end());
Expand Down

0 comments on commit 3070562

Please sign in to comment.