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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_string_manip.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-04-29 14:29:59 +0200
committerMartin Hořeňovský2023-05-01 13:21:45 +0200
commit10f0a5864319c0baa5c4cecb5e6138fd0c78a3e7 (patch)
treeb8b2383564d6f86b9040df61362b1f87b0f1df45 /src/catch2/internal/catch_string_manip.cpp
parentfe64c28925d31292516ba0a172870e7deb3baad6 (diff)
downloadcatch3-10f0a5864319c0baa5c4cecb5e6138fd0c78a3e7.tar.gz
Some template instantiation reductions
Diffstat (limited to 'src/catch2/internal/catch_string_manip.cpp')
-rw-r--r--src/catch2/internal/catch_string_manip.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/catch2/internal/catch_string_manip.cpp b/src/catch2/internal/catch_string_manip.cpp
index cb96dd4f..0c889ca1 100644
--- a/src/catch2/internal/catch_string_manip.cpp
+++ b/src/catch2/internal/catch_string_manip.cpp
@@ -8,7 +8,6 @@
#include <catch2/internal/catch_string_manip.hpp>
#include <catch2/internal/catch_stringref.hpp>
-#include <algorithm>
#include <ostream>
#include <cstring>
#include <cctype>
@@ -32,9 +31,9 @@ namespace Catch {
return s.find( infix ) != std::string::npos;
}
void toLowerInPlace( std::string& s ) {
- std::transform( s.begin(), s.end(), s.begin(), []( char c ) {
- return toLower( c );
- } );
+ for ( char& c : s ) {
+ c = toLower( c );
+ }
}
std::string toLower( std::string const& s ) {
std::string lc = s;