mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 19:33:29 +01:00
Use StringRef for CasedString::caseSensitivitySuffix return type
This commit is contained in:
parent
f16be402f7
commit
2e480b6e56
@ -21,10 +21,10 @@ namespace Matchers {
|
||||
? toLower( str )
|
||||
: str;
|
||||
}
|
||||
std::string CasedString::caseSensitivitySuffix() const {
|
||||
return m_caseSensitivity == CaseSensitive::No
|
||||
? " (case insensitive)"
|
||||
: std::string();
|
||||
StringRef CasedString::caseSensitivitySuffix() const {
|
||||
return m_caseSensitivity == CaseSensitive::Yes
|
||||
? StringRef()
|
||||
: " (case insensitive)"_sr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include <catch2/matchers/catch_matchers.hpp>
|
||||
#include <catch2/internal/catch_case_sensitive.hpp>
|
||||
#include <catch2/internal/catch_stringref.hpp>
|
||||
|
||||
#include <string>
|
||||
|
||||
@ -19,7 +20,7 @@ namespace Matchers {
|
||||
struct CasedString {
|
||||
CasedString( std::string const& str, CaseSensitive caseSensitivity );
|
||||
std::string adjustString( std::string const& str ) const;
|
||||
std::string caseSensitivitySuffix() const;
|
||||
StringRef caseSensitivitySuffix() const;
|
||||
|
||||
CaseSensitive m_caseSensitivity;
|
||||
std::string m_str;
|
||||
|
Loading…
Reference in New Issue
Block a user