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 <kefu.chai@scylladb.com> Closes scylladb/scylladb#22730
This commit is contained in:
committed by
Pavel Emelyanov
parent
09a090e410
commit
c6bf9d8d11
@@ -9,7 +9,6 @@
|
||||
#include "integrity_checked_file_impl.hh"
|
||||
#include <seastar/core/do_with.hh>
|
||||
#include <seastar/core/format.hh>
|
||||
#include <boost/algorithm/cxx11/all_of.hpp>
|
||||
#include "bytes.hh"
|
||||
|
||||
namespace sstables {
|
||||
@@ -34,7 +33,7 @@ static sstring report_zeroed_4k_aligned_blocks(const temporary_buffer<int8_t>& 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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user