diff options
| author | Martin Hořeňovský | 2023-02-19 14:03:03 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-02-20 15:05:09 +0100 |
| commit | e1dbad4c9e9e5517c188cbd8af04cb6369851207 (patch) | |
| tree | 94c416c873ad32a493f3c5c07c83e52b362500d2 /src/catch2/internal/catch_stringref.cpp | |
| parent | 2befd98da2b91c705de8fb0ea27bff662041f51c (diff) | |
| download | catch3-e1dbad4c9e9e5517c188cbd8af04cb6369851207.tar.gz | |
Inline StringRef::operator==
This enables its inlining even without LTO, which in turns enables
callers to determine that two StringRefs are unequals with simple
comparison of two numbers, without any function calls.
Diffstat (limited to 'src/catch2/internal/catch_stringref.cpp')
| -rw-r--r-- | src/catch2/internal/catch_stringref.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/catch2/internal/catch_stringref.cpp b/src/catch2/internal/catch_stringref.cpp index 668ff297..232498eb 100644 --- a/src/catch2/internal/catch_stringref.cpp +++ b/src/catch2/internal/catch_stringref.cpp @@ -17,10 +17,6 @@ namespace Catch { : StringRef( rawChars, std::strlen(rawChars) ) {} - auto StringRef::operator == ( StringRef other ) const noexcept -> bool { - return m_size == other.m_size - && (std::memcmp( m_start, other.m_start, m_size ) == 0); - } bool StringRef::operator<(StringRef rhs) const noexcept { if (m_size < rhs.m_size) { |