From 442e36f6526651c9419e0ac77666cb39e378f5b7 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Thu, 11 Apr 2024 04:33:29 +0300 Subject: [PATCH] Avoid -Wconversion in sv_find_{first,last}_not_of_test --- test/sv_find_first_not_of_test.cpp | 4 ++-- test/sv_find_last_not_of_test.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/sv_find_first_not_of_test.cpp b/test/sv_find_first_not_of_test.cpp index b5edb17..0d65f36 100644 --- a/test/sv_find_first_not_of_test.cpp +++ b/test/sv_find_first_not_of_test.cpp @@ -507,7 +507,7 @@ int main() { std::string str3( str2 ); - str3[ i ] = ~str3[ i ]; + str3[ i ] = static_cast( ~str3[ i ] ); BOOST_TEST_EQ( sv.find_first_not_of( str3 ), i ); } @@ -518,7 +518,7 @@ int main() { std::string str3( str2 ); - str3[ i ] = ~str3[ i ]; + str3[ i ] = static_cast( ~str3[ i ] ); BOOST_TEST_EQ( sv.find_first_not_of( str3 ), 255 - i ); } diff --git a/test/sv_find_last_not_of_test.cpp b/test/sv_find_last_not_of_test.cpp index 043e0f0..df1786d 100644 --- a/test/sv_find_last_not_of_test.cpp +++ b/test/sv_find_last_not_of_test.cpp @@ -507,7 +507,7 @@ int main() { std::string str3( str2 ); - str3[ i ] = ~str3[ i ]; + str3[ i ] = static_cast( ~str3[ i ] ); BOOST_TEST_EQ( sv.find_last_not_of( str3 ), i ); } @@ -518,7 +518,7 @@ int main() { std::string str3( str2 ); - str3[ i ] = ~str3[ i ]; + str3[ i ] = static_cast( ~str3[ i ] ); BOOST_TEST_EQ( sv.find_last_not_of( str3 ), 255 - i ); }