mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
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:
parent
0d543b604b
commit
2d6da6e112
Notes:
github-actions[bot]
2025-06-13 13:10:26 +00:00
Author: https://github.com/gmta
Commit: 2d6da6e112
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5067
Reviewed-by: https://github.com/tcl3
Reviewed-by: https://github.com/trflynn89
1 changed files with 0 additions and 1 deletions
|
@ -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) };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue