1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:27:35 +00:00

LibJS: Use Vector<u16, 1> for UTF-16 in a few more places

This commit is contained in:
Andreas Kling 2021-10-02 17:41:34 +02:00
parent dc99b702be
commit f0b3a06746
3 changed files with 3 additions and 3 deletions

View file

@ -1106,7 +1106,7 @@ Value add(GlobalObject& global_object, Value lhs, Value rhs)
auto const& lhs_utf16_string = lhs_string.utf16_string();
auto const& rhs_utf16_string = rhs_string.utf16_string();
Vector<u16> combined;
Vector<u16, 1> combined;
combined.ensure_capacity(lhs_utf16_string.length_in_code_units() + rhs_utf16_string.length_in_code_units());
combined.extend(lhs_utf16_string.string());
combined.extend(rhs_utf16_string.string());