Skip to content

Commit

Permalink
merian: ConcurrentQueue: Fix clang tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
LDAP committed Jan 26, 2025
1 parent f7fc344 commit 4e6e554
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions include/merian/utils/concurrent/concurrent_queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ template <typename T> class ConcurrentQueue {

ConcurrentQueue(ConcurrentQueue& other) = delete;

ConcurrentQueue(ConcurrentQueue&& other) {
ConcurrentQueue(ConcurrentQueue&& other) noexcept {
std::unique_lock lk_other(other.mutex);
std::unique_lock lk(mutex);
q = std::move(other.q);
}

ConcurrentQueue& operator=(const ConcurrentQueue& src) = delete;

ConcurrentQueue& operator=(ConcurrentQueue&& src) {
ConcurrentQueue& operator=(ConcurrentQueue&& src) noexcept {
if (this == &src)
return *this;
this->~ConcurrentQueue();
Expand Down Expand Up @@ -54,7 +54,6 @@ template <typename T> class ConcurrentQueue {
void wait_empty() {
std::unique_lock lk(mutex);
cv_empty.wait(lk, [&] { return q.empty(); });
return;
}

T pop() {
Expand Down

0 comments on commit 4e6e554

Please sign in to comment.