Skip to content

Commit b8da87a

Browse files
committed
Fixing MSVC warnings
1 parent b4b9fb9 commit b8da87a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_general.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ TEST_CASE( "data" ) {
756756
}
757757
}
758758
std::vector<sys_string::storage_type> buf(str.storage_size() + 5);
759-
auto res = str.copy_data(0, buf.data(), buf.size());
759+
auto res = str.copy_data(0, buf.data(), sys_string::size_type(buf.size()));
760760
REQUIRE(res == str.storage_size());
761761

762762
if constexpr (std::is_same_v<sys_string::storage_type, char>)
@@ -766,7 +766,7 @@ TEST_CASE( "data" ) {
766766
else
767767
CHECK(memcmp(buf.data(), U"a🧡bc", str.storage_size() * sizeof(sys_string::storage_type)) == 0);
768768

769-
res = str.copy_data(1, buf.data(), buf.size());
769+
res = str.copy_data(1, buf.data(), sys_string::size_type(buf.size()));
770770
REQUIRE(res == str.storage_size() - 1);
771771

772772
if constexpr (std::is_same_v<sys_string::storage_type, char>)
@@ -776,7 +776,7 @@ TEST_CASE( "data" ) {
776776
else
777777
CHECK(memcmp(buf.data(), (U"a🧡bc") + 1, (str.storage_size() - 1) * sizeof(sys_string::storage_type)) == 0);
778778

779-
res = sys_string().copy_data(0, buf.data(), buf.size());
779+
res = sys_string().copy_data(0, buf.data(), sys_string::size_type(buf.size()));
780780
REQUIRE(res == 0);
781781
}
782782

0 commit comments

Comments
 (0)