mirror of
https://github.com/nlohmann/json.git
synced 2026-02-17 09:03:58 +00:00
Fix -Wtautological-constant-out-of-range-compare in serializer (#5050)
Signed-off-by: Charles Cabergs <me@cacharle.xyz>
This commit is contained in:
@@ -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];
|
const std::uint8_t type = utf8d[byte];
|
||||||
|
|
||||||
codep = (state != UTF8_ACCEPT)
|
codep = (state != UTF8_ACCEPT)
|
||||||
|
|||||||
@@ -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];
|
const std::uint8_t type = utf8d[byte];
|
||||||
|
|
||||||
codep = (state != UTF8_ACCEPT)
|
codep = (state != UTF8_ACCEPT)
|
||||||
|
|||||||
Reference in New Issue
Block a user