summaryrefslogtreecommitdiff
path: root/asl/string_view.hpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-11-14 23:28:54 +0100
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-12-20 15:35:58 +0100
commit8aad6443ded53db1b98aec63172b4e9944b3b6e9 (patch)
tree5f81ef454388ecfb94c9cca7008f45dba8cbbeb6 /asl/string_view.hpp
parentae9608d4f69a07c3efcf6ba9f38cb4ac23cc2110 (diff)
Replace some builtins
Diffstat (limited to 'asl/string_view.hpp')
-rw-r--r--asl/string_view.hpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/asl/string_view.hpp b/asl/string_view.hpp
index 85f1323..51d4234 100644
--- a/asl/string_view.hpp
+++ b/asl/string_view.hpp
@@ -3,12 +3,11 @@
#include "asl/integers.hpp"
#include "asl/meta.hpp"
#include "asl/span.hpp"
+#include "asl/memory.hpp"
namespace asl
{
-// @Todo Replace all the __builtin_strlen
-
class string_view
{
const char* m_data{};
@@ -74,8 +73,7 @@ public:
constexpr bool operator==(string_view other) const
{
if (m_size != other.m_size) { return false; }
- // @Todo Remove builtin_memcmp
- return __builtin_memcmp(m_data, other.m_data, static_cast<size_t>(m_size)) == 0;
+ return memcmp(m_data, other.m_data, m_size) == 0;
}
};