Fix -Wtautological-constant-out-of-range-compare in serializer (#5050)

Signed-off-by: Charles Cabergs <me@cacharle.xyz>
This commit is contained in:
Charles Cabergs
2026-01-13 17:19:38 +01:00
committed by GitHub
parent e3014f162a
commit 5ed07097fa
2 changed files with 2 additions and 2 deletions

View File

@@ -919,7 +919,7 @@ class serializer
}
};
JSON_ASSERT(byte < utf8d.size());
JSON_ASSERT(static_cast<std::size_t>(byte) < utf8d.size());
const std::uint8_t type = utf8d[byte];
codep = (state != UTF8_ACCEPT)

View File

@@ -19755,7 +19755,7 @@ class serializer
}
};
JSON_ASSERT(byte < utf8d.size());
JSON_ASSERT(static_cast<std::size_t>(byte) < utf8d.size());
const std::uint8_t type = utf8d[byte];
codep = (state != UTF8_ACCEPT)