mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-25 21:16:38 +03:00
Always optimize StringView::strlen (recursive due to constexpr)
This commit is contained in:
parent
fbcc979117
commit
b5ab318a2d
@ -164,6 +164,7 @@ public:
|
||||
ZeroTerminatedString zstr() const { return {begin(), end()}; }
|
||||
|
||||
private:
|
||||
[[gnu::optimize(3)]] // this is recursive for constexpr reason
|
||||
static constexpr ByteCount strlen(const char* s)
|
||||
{
|
||||
return *s == 0 ? 0 : strlen(s+1) + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user