diff options
| author | Phil Nash | 2017-11-21 11:08:08 +0000 |
|---|---|---|
| committer | Phil Nash | 2017-11-21 11:08:39 +0000 |
| commit | e4a898eaaa0f0458cd5d9f6d63a311366aa8eb0a (patch) | |
| tree | cbeaff5db4186e7a4c17bd0d9a63dbcda5aefcfa /include/internal/catch_stringref.cpp | |
| parent | c39109dce37ce4afad9c6e2a002b32c5313654b9 (diff) | |
| download | catch3-e4a898eaaa0f0458cd5d9f6d63a311366aa8eb0a.tar.gz | |
Removed templated StringRef ctor and added StringRef literal
Diffstat (limited to 'include/internal/catch_stringref.cpp')
| -rw-r--r-- | include/internal/catch_stringref.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/include/internal/catch_stringref.cpp b/include/internal/catch_stringref.cpp index 127406ff..bac8b1d8 100644 --- a/include/internal/catch_stringref.cpp +++ b/include/internal/catch_stringref.cpp @@ -17,11 +17,9 @@ #include <cstring> namespace Catch { - auto StringRef::fromRaw( char const* rawChars ) -> StringRef { - return rawChars - ? StringRef( rawChars,static_cast<StringRef::size_type>(std::strlen(rawChars) ) ) - : StringRef(); - } + StringRef::StringRef( char const* rawChars ) noexcept + : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) ) + {} StringRef::operator std::string() const { return std::string( m_start, m_size ); |