1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-28 06:08:05 +03:00

Always inline StringStorage methods

This commit is contained in:
Maxime Coste 2015-01-26 19:41:26 +00:00
parent b697bf1795
commit 2c425bb436

View File

@ -14,8 +14,11 @@ struct StringStorage : UseMemoryDomain<MemoryDomain::SharedString>
int refcount;
int length;
[[gnu::always_inline]]
char* data() { return reinterpret_cast<char*>(this + 1); }
[[gnu::always_inline]]
const char* data() const { return reinterpret_cast<const char*>(this + 1); }
[[gnu::always_inline]]
StringView strview() const { return {data(), length}; }
static StringStorage* create(StringView str, char back = 0)