Enable modernize-use-integer-sign-comparison check (#4581)

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann
2025-01-02 13:24:05 +01:00
committed by GitHub
parent 4f64d8d0b4
commit f038ac4c9d
5 changed files with 9 additions and 10 deletions

View File

@@ -75,7 +75,7 @@ class SaxEventLogger
bool start_object(std::size_t elements)
{
if (elements == static_cast<std::size_t>(-1))
if (elements == (std::numeric_limits<std::size_t>::max)())
{
events.emplace_back("start_object()");
}
@@ -100,7 +100,7 @@ class SaxEventLogger
bool start_array(std::size_t elements)
{
if (elements == static_cast<std::size_t>(-1))
if (elements == (std::numeric_limits<std::size_t>::max)())
{
events.emplace_back("start_array()");
}