fix implicit scalar conversions (needed to support fancy scalar types, see bug #276)

(transplanted from d61f1eae804a5dc4924f167c00fbde31c1bef7ea)
This commit is contained in:
David H. Bailey
2011-05-23 11:20:13 +02:00
parent e3a521be6b
commit b3c3627c72
8 changed files with 27 additions and 27 deletions

View File

@@ -468,7 +468,7 @@ struct triangular_assignment_selector
if (Mode&UnitDiag && row==col)
dst.coeffRef(row, col) = 1;
else
dst.coeffRef(row, col) = 0;
dst.coeffRef(row, col) = static_cast<typename Derived1::Scalar>(0);
}
}
};
@@ -493,7 +493,7 @@ struct triangular_assignment_selector<Derived1, Derived2, Upper, Dynamic, ClearO
dst.copyCoeff(i, j, src);
if (ClearOpposite)
for(Index i = maxi+1; i < dst.rows(); ++i)
dst.coeffRef(i, j) = 0;
dst.coeffRef(i, j) = static_cast<typename Derived1::Scalar>(0);
}
}
};
@@ -511,7 +511,7 @@ struct triangular_assignment_selector<Derived1, Derived2, Lower, Dynamic, ClearO
Index maxi = std::min(j, dst.rows());
if (ClearOpposite)
for(Index i = 0; i < maxi; ++i)
dst.coeffRef(i, j) = 0;
dst.coeffRef(i, j) = static_cast<typename Derived1::Scalar>(0);
}
}
};
@@ -547,7 +547,7 @@ struct triangular_assignment_selector<Derived1, Derived2, StrictlyLower, Dynamic
Index maxi = std::min(j, dst.rows()-1);
if (ClearOpposite)
for(Index i = 0; i <= maxi; ++i)
dst.coeffRef(i, j) = 0;
dst.coeffRef(i, j) = static_cast<typename Derived1::Scalar>(0);
}
}
};