chore: Enable most readability checks (#7772)

This commit is contained in:
Ayaz Salikhov
2026-07-14 13:21:40 +01:00
committed by GitHub
parent acd54fd627
commit e1d4f357dc
42 changed files with 102 additions and 887 deletions

View File

@@ -358,12 +358,13 @@ template <class = void>
bool
tokenInList(boost::string_ref const& value, boost::string_ref const& token)
{
for (auto const& item : makeList(value))
{
if (ciEqual(item, token))
return true;
}
return false;
auto const list = makeList(value);
// ListIterator is not default-constructible, so it does not model a std::ranges
// sentinel/range; the classic std::any_of (which only needs an input iterator)
// is used instead.
// NOLINTNEXTLINE(modernize-use-ranges)
return std::any_of(
list.begin(), list.end(), [&token](auto const& item) { return ciEqual(item, token); });
}
template <bool IsRequest, class Body, class Fields>

View File

@@ -13,7 +13,7 @@
#include <soci/session.h>
#include <memory>
#if defined(__clang__)
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated"
#endif
@@ -120,6 +120,6 @@ makeCheckpointer(std::uintptr_t id, std::weak_ptr<soci::session>, JobQueue&, Ser
} // namespace xrpl
#if defined(__clang__)
#ifdef __clang__
#pragma clang diagnostic pop
#endif