AK: Remove superfluous check from Utf16View::subtring_view()

The `Span::slice()` operation just below it performs the exact same
check.
This commit is contained in:
Jelle Raaijmakers 2025-06-11 13:04:42 +02:00 committed by Jelle Raaijmakers
commit 2d6da6e112
Notes: github-actions[bot] 2025-06-13 13:10:26 +00:00

View file

@ -249,7 +249,6 @@ size_t Utf16View::code_unit_offset_of(Utf16CodePointIterator const& it) const
Utf16View Utf16View::substring_view(size_t code_unit_offset, size_t code_unit_length) const
{
VERIFY(!Checked<size_t>::addition_would_overflow(code_unit_offset, code_unit_length));
VERIFY(code_unit_offset + code_unit_length <= length_in_code_units());
return Utf16View { m_code_units.slice(code_unit_offset, code_unit_length) };
}