1
1
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:
Maxime Coste 2015-04-07 23:21:14 +01:00
parent fbcc979117
commit b5ab318a2d

View File

@ -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;