mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 16:10:20 +00:00
LibVT: Use StringBuilder::string_view() instead of to_string()
This let's us avoid a heap allocation.
This commit is contained in:
parent
b22cb40565
commit
ccad3d5a39
Notes:
sideshowbarker
2024-07-17 18:40:17 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/ccad3d5a39 Pull-request: https://github.com/SerenityOS/serenity/pull/12564 Reviewed-by: https://github.com/MaxWipfli
1 changed files with 1 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue