From 2db1cf34047f76cb2679a3804b476881536ad27b Mon Sep 17 00:00:00 2001 From: SketchyLizard Date: Wed, 17 Nov 2021 09:01:12 -0500 Subject: [PATCH] Fix template args to avoid conversion warnings Fix avoids a warning about sign conversion when included from a file compiled with -Werror=sign-conversion. --- src/catch2/catch_tostring.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp index 0bbf989c..9182a119 100644 --- a/src/catch2/catch_tostring.hpp +++ b/src/catch2/catch_tostring.hpp @@ -205,7 +205,7 @@ namespace Catch { }; #endif // CATCH_CONFIG_WCHAR - template + template struct StringMaker { static std::string convert(char const* str) { // Note that `strnlen` is not actually part of standard C++, @@ -214,7 +214,7 @@ namespace Catch { StringRef( str, strnlen( str, SZ ) ) ); } }; - template + template struct StringMaker { static std::string convert(signed char const* str) { // See the plain `char const*` overload @@ -223,7 +223,7 @@ namespace Catch { StringRef(reinterpreted, strnlen(reinterpreted, SZ))); } }; - template + template struct StringMaker { static std::string convert(unsigned char const* str) { // See the plain `char const*` overload @@ -522,7 +522,7 @@ namespace Catch { } }; - template + template struct StringMaker { static std::string convert(T const(&arr)[SZ]) { return rangeToString(arr);