diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-16 15:35:14 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-16 15:35:14 +0100 |
commit | 060168dd1181bb38126e61819ca199b85f7c8fed (patch) | |
tree | a0ebcf2b411280e008dde0928a4d220b774d89b6 /src/entity.hpp | |
parent | 1dd83437e5777f699184452667e7698072fd5cb4 (diff) |
entity: don't need static string literal after all
Diffstat (limited to 'src/entity.hpp')
-rw-r--r-- | src/entity.hpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/entity.hpp b/src/entity.hpp index 8d62780b..a5c9aa90 100644 --- a/src/entity.hpp +++ b/src/entity.hpp @@ -110,33 +110,6 @@ struct write_field<Obj, Type, fu2::function_base<IsOwning, IsCopyable, Capacity, } }; -constexpr inline int memcmp_(const char* s1, const char* s2, std::size_t n) -{ -#ifdef __GNUC__ - return __builtin_memcmp(s1, s2, n); -#else - if (n != 0) { - do { - if (*s1++ != *s2++) - return (static_cast<unsigned char>(*--s1) - static_cast<unsigned char>(*--s2)); - } while (--n != 0); - } - return 0; -#endif -} - -constexpr inline std::size_t strlen_(const char* s) -{ -#ifdef __GNUC__ - return __builtin_strlen(s); -#else - const char* end; - for (end = s; *end; end++) - ; - return std::size_t(end - s); -#endif -} - template<typename F, typename Tuple, std::size_t N> requires std::invocable<F, decltype(std::get<N>(std::declval<Tuple>()))> constexpr CORRADE_ALWAYS_INLINE void visit_tuple(F&& fun, Tuple&& tuple) |