mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +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
|
@ -81,7 +81,7 @@ Vector<u32> CharacterMapFile::read_map(const JsonObject& json, const String& nam
|
|||
} else if (key_value.length() == 1) {
|
||||
buffer[i] = key_value.characters()[0];
|
||||
} else {
|
||||
Utf8View m_utf8_view(key_value.characters());
|
||||
Utf8View m_utf8_view(key_value);
|
||||
buffer[i] = *m_utf8_view.begin();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue