Keep the byte comparison helpers in compare.hpp

Address review comments: bytes_equal() and bytes_less() move from node.hpp
to compare.hpp, their only user; key_less() no longer splits the comment of
resolve_indices() from its function; and the loop counters of bytes_equal()
and all_digits() are scoped to their loops.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-23 06:47:22 +02:00
1 parent db5bd7fbcc
commit 55cdc93ff8
4 files changed
+152 -154

No files matched your search

+1 -2
View File
@@ -290,8 +290,7 @@ inline bool all_digits(const unsigned char* p, std::size_t n) noexcept
};
if (n >= 8)
{
std::size_t i = 0;
for (; i + 8 < n; i += 8)
for (std::size_t i = 0; i + 8 < n; i += 8)
{
if (!digits(p + i))
{