From e25218217124fcf318276c145d5928ddf13fc607 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 16 Mar 2025 17:09:49 +0100 Subject: [PATCH] chore(block_cache): cannot easily use `std::ranges` heap operations --- src/reader/internal/block_cache.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/reader/internal/block_cache.cpp b/src/reader/internal/block_cache.cpp index badc5546..696cf365 100644 --- a/src/reader/internal/block_cache.cpp +++ b/src/reader/internal/block_cache.cpp @@ -179,6 +179,7 @@ class block_request_set { } queue_.emplace_back(begin, end, std::move(promise)); + // NOLINTNEXTLINE(modernize-use-ranges) std::push_heap(queue_.begin(), queue_.end()); } @@ -186,11 +187,13 @@ class block_request_set { queue_.reserve(queue_.size() + other.queue_.size()); std::ranges::move(other.queue_, std::back_inserter(queue_)); other.queue_.clear(); + // NOLINTNEXTLINE(modernize-use-ranges) std::make_heap(queue_.begin(), queue_.end()); range_end_ = std::max(range_end_, other.range_end_); } block_request get() { + // NOLINTNEXTLINE(modernize-use-ranges) std::pop_heap(queue_.begin(), queue_.end()); block_request tmp = std::move(queue_.back()); queue_.pop_back();