From db841f71bd9ff8b8ee3afe469d4b56dd76a2092a Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Thu, 24 Jul 2025 20:57:44 -0400 Subject: [PATCH] refactor: PriorityQueue, Use std::ranges version of heap methods --- src/lib/base/PriorityQueue.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/base/PriorityQueue.h b/src/lib/base/PriorityQueue.h index bfbc71132..260d67889 100644 --- a/src/lib/base/PriorityQueue.h +++ b/src/lib/base/PriorityQueue.h @@ -46,13 +46,13 @@ public: void push(const value_type &v) { c.push_back(v); - std::push_heap(c.begin(), c.end(), comp); + std::ranges::push_heap(c, comp); } //! Remove head element void pop() { - std::pop_heap(c.begin(), c.end(), comp); + std::ranges::pop_heap(c, comp); c.pop_back(); } @@ -60,7 +60,7 @@ public: void erase(iterator i) { c.erase(i); - std::make_heap(c.begin(), c.end(), comp); + std::ranges::make_heap(c, comp); } //! Get start iterator @@ -85,7 +85,7 @@ public: void swap(Container &c2) noexcept { c.swap(c2); - std::make_heap(c.begin(), c.end(), comp); + std::ranges::make_heap(c, comp); } //@}