Fix clang-tidy 22 findings in unit-json_view_image.cpp and image.hpp

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
(cherry picked from commit 611faf2c88)
This commit is contained in:
Niels Lohmann committed 2026-10-10 01:26:37 +02:00
1 parent 43ee476648
commit b3c9deebb7
2 files changed
+12 -4

No files matched your search

+9 -1
View File
@@ -437,7 +437,15 @@ inline bool check_float_ranges(std::vector<float_range>& ranges, const unsigned
{
std::sort(ranges.begin(), ranges.end(), [](const float_range & a, const float_range & b)
{
return a.off != b.off ? a.off < b.off : (a.len != b.len ? a.len < b.len : a.extra < b.extra);
if (a.off != b.off)
{
return a.off < b.off;
}
if (a.len != b.len)
{
return a.len < b.len;
}
return a.extra < b.extra;
});
std::size_t end = 0;
std::size_t i = 0;