1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09: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:
Andreas Kling 2021-09-18 18:02:41 +02:00
parent 291dbff2e1
commit 1be4cbd639
Notes: sideshowbarker 2024-07-18 03:43:17 +09:00
9 changed files with 36 additions and 42 deletions

View file

@ -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();
}
}