catch3
Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.
Clonegit clone https://git.progmasoft.com/catch3
Fix transform narrowing warnings
- Commit
79f01100e33cb28af06be67da9755e36566970dc- Author
- Billy Robert O'Neal III ·
- Parents
ccf7f2842a35
Changes
include/internal/catch_common.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/internal/catch_common.hpp b/include/internal/catch_common.hpp index 2342ae61..87743ccb 100644 --- a/include/internal/catch_common.hpp +++ b/include/internal/catch_common.hpp @@ -22,7 +22,8 @@ namespace Catch { return s.find( infix ) != std::string::npos; } void toLowerInPlace( std::string& s ) { - std::transform( s.begin(), s.end(), s.begin(), ::tolower ); + std::transform( s.begin(), s.end(), s.begin(), + [](char c) { return static_cast<char>(::tolower(c)); } ); } std::string toLower( std::string const& s ) { std::string lc = s;