Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_stringref.cpp
diff options
context:
space:
mode:
authorPhil Nash2017-11-21 11:08:08 +0000
committerPhil Nash2017-11-21 11:08:39 +0000
commite4a898eaaa0f0458cd5d9f6d63a311366aa8eb0a (patch)
treecbeaff5db4186e7a4c17bd0d9a63dbcda5aefcfa /include/internal/catch_stringref.cpp
parentc39109dce37ce4afad9c6e2a002b32c5313654b9 (diff)
downloadcatch3-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.cpp8
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 );