mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
@@ -11,21 +11,6 @@
|
||||
|
||||
namespace AK {
|
||||
|
||||
Utf8View::Utf8View(const String& string)
|
||||
: m_string(string)
|
||||
{
|
||||
}
|
||||
|
||||
Utf8View::Utf8View(const StringView& string)
|
||||
: m_string(string)
|
||||
{
|
||||
}
|
||||
|
||||
Utf8View::Utf8View(const char* string)
|
||||
: m_string(string)
|
||||
{
|
||||
}
|
||||
|
||||
const unsigned char* Utf8View::begin_ptr() const
|
||||
{
|
||||
return (const unsigned char*)m_string.characters_without_null_termination();
|
||||
|
||||
Reference in New Issue
Block a user