Fix "unary minus operator applied to unsigned type, result still unsigned" on MSVC and other stupid warnings

This commit is contained in:
Charles Schlosser
2024-04-12 19:35:04 +00:00
committed by Rasmus Munk Larsen
parent dcdb0233c1
commit 122befe54c
15 changed files with 215 additions and 128 deletions

View File

@@ -110,29 +110,29 @@ void sparse_vector(int rows, int cols) {
// test move
{
SparseVectorType v3(std::move(v1));
VERIFY_IS_APPROX(v3, refV1);
v1 = v3;
SparseVectorType tmp(std::move(v1));
VERIFY_IS_APPROX(tmp, refV1);
v1 = tmp;
}
{
SparseVectorType v3;
v3 = std::move(v1);
VERIFY_IS_APPROX(v3, refV1);
v1 = v3;
SparseVectorType tmp;
tmp = std::move(v1);
VERIFY_IS_APPROX(tmp, refV1);
v1 = tmp;
}
{
SparseVectorType v3(std::move(mv1));
VERIFY_IS_APPROX(v3, refV1);
mv1 = v3;
SparseVectorType tmp(std::move(mv1));
VERIFY_IS_APPROX(tmp, refV1);
mv1 = tmp;
}
{
SparseVectorType v3;
v3 = std::move(mv1);
VERIFY_IS_APPROX(v3, refV1);
mv1 = v3;
SparseVectorType tmp;
tmp = std::move(mv1);
VERIFY_IS_APPROX(tmp, refV1);
mv1 = tmp;
}
// test conservative resize