Fix clang-tidy style and regenerate amalgamation

- Remove 'else' after 'return' in hash.hpp to satisfy
  llvm-else-after-return / readability-else-after-return clang-tidy checks
- Regenerate single_include/nlohmann/json.hpp via 'make amalgamate'
  (also fixes pre-existing amalgamation/astyle formatting drift)
- Apply astyle formatting fixes to unit-hash.cpp (space before '{}')

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2026-07-10 06:41:38 +02:00
parent 68c87ad9de
commit 48face7a20
3 changed files with 89 additions and 91 deletions
+10 -11
View File
@@ -56,7 +56,10 @@ inline bool is_exactly_representable_as_float(typename BasicJsonType::number_int
// Check absolute value against this threshold
if (val >= 0)
{
if (val >= max_exact) return false;
if (val >= max_exact)
{
return false;
}
}
else
{
@@ -152,11 +155,9 @@ std::size_t hash(const BasicJsonType& j)
const auto h = std::hash<number_float_t> {}(static_cast<number_float_t>(v));
return combine(numeric_type, h);
}
else
{
const auto h = std::hash<number_integer_t> {}(v);
return combine(numeric_type, h);
}
const auto h = std::hash<number_integer_t> {}(v);
return combine(numeric_type, h);
}
case BasicJsonType::value_t::number_unsigned:
@@ -172,11 +173,9 @@ std::size_t hash(const BasicJsonType& j)
const auto h = std::hash<number_float_t> {}(static_cast<number_float_t>(v_as_signed));
return combine(numeric_type, h);
}
else
{
const auto h = std::hash<number_integer_t> {}(v_as_signed);
return combine(numeric_type, h);
}
const auto h = std::hash<number_integer_t> {}(v_as_signed);
return combine(numeric_type, h);
}
case BasicJsonType::value_t::number_float: