refactor: PriorityQueue::Swap make noexcept

This commit is contained in:
sithlord48 2025-07-03 09:15:13 -04:00 committed by Nick Bolton
parent 2c2a5c0269
commit 66ddaca410

View file

@ -76,13 +76,13 @@ public:
} }
//! Swap contents with another priority queue //! Swap contents with another priority queue
void swap(PriorityQueue<T, Container, Compare> &q) void swap(PriorityQueue<T, Container, Compare> &q) noexcept
{ {
c.swap(q.c); c.swap(q.c);
} }
//! Swap contents with another container //! Swap contents with another container
void swap(Container &c2) void swap(Container &c2) noexcept
{ {
c.swap(c2); c.swap(c2);
std::make_heap(c.begin(), c.end(), comp); std::make_heap(c.begin(), c.end(), comp);