1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +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:
Andreas Kling 2021-09-18 18:02:41 +02:00
parent 291dbff2e1
commit 1be4cbd639
9 changed files with 36 additions and 42 deletions

View file

@ -234,7 +234,7 @@ public:
if (size == -1)
return false;
m_lines.extend(wrap_line(Utf8View(line), m_width));
m_lines.extend(wrap_line(Utf8View { StringView { line } }, m_width));
free(line);
return true;
}