summaryrefslogtreecommitdiff
path: root/AK/StringView.h
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@serenityos.org>2020-04-30 11:51:55 +0300
committerAndreas Kling <kling@serenityos.org>2020-04-30 11:30:27 +0200
commit279cf9294ac5fd32a821b6410dd68e2375b2f629 (patch)
tree3ce5b00e04ef5959586278c039de94d99757c0b5 /AK/StringView.h
parent135d29b498ec4b95998b06217f0391ddad707e0f (diff)
downloadserenity-279cf9294ac5fd32a821b6410dd68e2375b2f629.zip
AK: Always inline trivial StringView constructors
Diffstat (limited to 'AK/StringView.h')
-rw-r--r--AK/StringView.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/AK/StringView.h b/AK/StringView.h
index 56f35d4088..909125e23b 100644
--- a/AK/StringView.h
+++ b/AK/StringView.h
@@ -38,14 +38,14 @@ class StringView {
public:
using ConstIterator = const char*;
- StringView() { }
- StringView(const char* characters, size_t length)
+ [[gnu::always_inline]] inline StringView() { }
+ [[gnu::always_inline]] inline StringView(const char* characters, size_t length)
: m_characters(characters)
, m_length(length)
{
ASSERT(!Checked<uintptr_t>::addition_would_overflow((uintptr_t)characters, length));
}
- StringView(const unsigned char* characters, size_t length)
+ [[gnu::always_inline]] inline StringView(const unsigned char* characters, size_t length)
: m_characters((const char*)characters)
, m_length(length)
{