diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-04-07 23:21:14 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-04-07 23:21:14 +0100 |
| commit | b5ab318a2d33e99e322ee02f2dd037929232db58 (patch) | |
| tree | cfb961022636ca18ec34e4bb9cfdcd57a943e73d /src/string.hh | |
| parent | fbcc979117cca2fbb120b7e95573cb88eb53a56c (diff) | |
Always optimize StringView::strlen (recursive due to constexpr)
Diffstat (limited to 'src/string.hh')
| -rw-r--r-- | src/string.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/string.hh b/src/string.hh index 6b66bce4..a6a267cb 100644 --- a/src/string.hh +++ b/src/string.hh @@ -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; |
