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:
4 files changed
+152
-154
No files matched your search
@@ -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))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user