LibVT: Use StringBuilder::string_view() instead of to_string()

This let's us avoid a heap allocation.
This commit is contained in:
Idan Horowitz 2022-02-15 23:43:32 +02:00 committed by Andreas Kling
parent b22cb40565
commit ccad3d5a39
Notes: sideshowbarker 2024-07-17 18:40:17 +09:00

View file

@ -1441,8 +1441,7 @@ void Terminal::handle_key_press(KeyCode key, u32 code_point, u8 flags)
StringBuilder sb;
sb.append_code_point(code_point);
emit_string(sb.to_string());
emit_string(sb.string_view());
}
void Terminal::unimplemented_control_code(u8 code)