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

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_string_manip.cpp
diff options
context:
space:
mode:
authorPhil Nash2018-06-12 14:09:30 +0100
committerPhil Nash2018-06-12 14:09:30 +0100
commitb8553d62a3a98ac9d358d20b48cf99f775291557 (patch)
tree7657a28f7fd99132590e6b417954eb77f4a66f95 /include/internal/catch_string_manip.cpp
parent504607701bd5bbe6a4dbd26709aac3e181a075e3 (diff)
downloadcatch3-b8553d62a3a98ac9d358d20b48cf99f775291557.tar.gz
Moved inline functions in cpp files into anon namespaces
Diffstat (limited to 'include/internal/catch_string_manip.cpp')
-rw-r--r--include/internal/catch_string_manip.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/internal/catch_string_manip.cpp b/include/internal/catch_string_manip.cpp
index 68f54e01..904d1013 100644
--- a/include/internal/catch_string_manip.cpp
+++ b/include/internal/catch_string_manip.cpp
@@ -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 );
}