From c6bf9d8d11790a7296cd0224a94e6580a7d7861b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 27 Jan 2025 11:44:06 +0800 Subject: [PATCH] sstables: switch from boost to std::ranges::all_of() Replace boost::algorithm::all_of_equal() to std::ranges::all_of() In order to reduce the header dependency to boost ranges library, let's use the utility from the standard library when appropriate. Signed-off-by: Kefu Chai Closes scylladb/scylladb#22730 --- sstables/integrity_checked_file_impl.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sstables/integrity_checked_file_impl.cc b/sstables/integrity_checked_file_impl.cc index 02513b1c56..a3c1c0db7d 100644 --- a/sstables/integrity_checked_file_impl.cc +++ b/sstables/integrity_checked_file_impl.cc @@ -9,7 +9,6 @@ #include "integrity_checked_file_impl.hh" #include #include -#include #include "bytes.hh" namespace sstables { @@ -34,7 +33,7 @@ static sstring report_zeroed_4k_aligned_blocks(const temporary_buffer& b auto begin = buf.get() + off; auto end = begin + len; - if (boost::algorithm::all_of_equal(begin, end, 0)) { + if (std::ranges::all_of(begin, end, [](auto byte) { return byte == 0; })) { report += format("{:d}, ", off); } }