mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
AK: Make Utf8View constructors inline and remove C string constructor
Using StringView instead of C strings is basically always preferable. The only reason to use a C string is because you are calling a C API.
This commit is contained in:
parent
291dbff2e1
commit
1be4cbd639
9 changed files with 36 additions and 42 deletions
|
@ -187,7 +187,7 @@ void WindowServerConnection::key_down(i32 window_id, u32 code_point, u32 key, u3
|
|||
key_event->m_key = Key_Invalid;
|
||||
key_event->m_modifiers = 0;
|
||||
|
||||
Utf8View m_utf8_view(emoji_input_dialog->selected_emoji_text().characters());
|
||||
Utf8View m_utf8_view(emoji_input_dialog->selected_emoji_text());
|
||||
u32 emoji_code_point = *m_utf8_view.begin();
|
||||
|
||||
key_event->m_code_point = emoji_code_point;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue