Moved inline functions in cpp files into anon namespaces

This commit is contained in:
Phil Nash
2018-06-12 14:09:30 +01:00
parent 504607701b
commit b8553d62a3
4 changed files with 61 additions and 52 deletions

View File

@@ -14,6 +14,12 @@
namespace Catch {
namespace {
char toLowerCh(char c) {
return static_cast<char>( std::tolower( c ) );
}
}
bool startsWith( std::string const& s, std::string const& prefix ) {
return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
}
@@ -29,9 +35,6 @@ namespace Catch {
bool contains( std::string const& s, std::string const& infix ) {
return s.find( infix ) != std::string::npos;
}
inline char toLowerCh(char c) {
return static_cast<char>( std::tolower( c ) );
}
void toLowerInPlace( std::string& s ) {
std::transform( s.begin(), s.end(), s.begin(), toLowerCh );
}