From ba724a26f4d6018ff612a71a74e581d2232cfddc Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 11 Feb 2025 08:39:55 +0800 Subject: [PATCH] sstable: migrate from boost::remove_if() to std::erase_if() Replace boost::remove_if() with the standard library's std::erase_if() to reduce external dependencies and simplify the codebase. This change eliminates the requirement for boost::range and makes the implementation more maintainable. Signed-off-by: Kefu Chai --- sstables/sstable_set.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sstables/sstable_set.cc b/sstables/sstable_set.cc index 67bb4011bc..b2535a17b2 100644 --- a/sstables/sstable_set.cc +++ b/sstables/sstable_set.cc @@ -12,8 +12,6 @@ #include #include -#include -#include #include #include @@ -890,7 +888,7 @@ make_sstable_filter(const dht::ring_position& pos, const schema& schema, const s static std::vector filter_sstable_for_reader(std::vector&& sstables, const schema& schema, const dht::ring_position& pos, const sstable_predicate& predicate) { auto filter = [_filter = make_sstable_filter(pos, schema, predicate)] (const shared_sstable& sst) { return !_filter(*sst); }; - sstables.erase(boost::remove_if(sstables, filter), sstables.end()); + std::erase_if(sstables, filter); return std::move(sstables); }