Reinline some StringRef methods with trivial bodies

This commit is contained in:
Martin Hořeňovský 2019-09-08 21:08:37 +02:00
parent dab0296b64
commit a156440b19
No known key found for this signature in database
GPG key ID: DE48307B8B0D381A
2 changed files with 8 additions and 10 deletions

View file

@ -22,10 +22,6 @@ namespace Catch {
: StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )
{}
StringRef::operator std::string() const {
return std::string( m_start, m_size );
}
void StringRef::swap( StringRef& other ) noexcept {
std::swap( m_start, other.m_start );
std::swap( m_size, other.m_size );
@ -72,10 +68,6 @@ namespace Catch {
return !operator==( other );
}
auto StringRef::operator[](size_type index) const noexcept -> char {
return m_start[index];
}
auto operator << ( std::ostream& os, StringRef const& str ) -> std::ostream& {
return os.write(str.currentData(), str.size());
}