mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix a dozen of warnings with MSVC, and get rid of some useless throw()
This commit is contained in:
@@ -153,12 +153,12 @@ class SparseInnerVectorSet<SparseMatrix<_Scalar, _Options, _Index>, Size>
|
||||
SparseMatrix<Scalar, IsRowMajor ? RowMajor : ColMajor, Index> tmp(other);
|
||||
|
||||
// 2 - let's check whether there is enough allocated memory
|
||||
Index nnz = tmp.nonZeros();
|
||||
Index nnz_previous = nonZeros();
|
||||
Index free_size = matrix.data().allocatedSize() + nnz_previous;
|
||||
std::size_t nnz_head = m_outerStart==0 ? 0 : matrix.outerIndexPtr()[m_outerStart];
|
||||
std::size_t tail = m_matrix.outerIndexPtr()[m_outerStart+m_outerSize.value()];
|
||||
std::size_t nnz_tail = matrix.nonZeros() - tail;
|
||||
Index nnz = tmp.nonZeros();
|
||||
Index nnz_previous = nonZeros();
|
||||
Index free_size = Index(matrix.data().allocatedSize()) + nnz_previous;
|
||||
Index nnz_head = m_outerStart==0 ? 0 : matrix.outerIndexPtr()[m_outerStart];
|
||||
Index tail = m_matrix.outerIndexPtr()[m_outerStart+m_outerSize.value()];
|
||||
Index nnz_tail = matrix.nonZeros() - tail;
|
||||
|
||||
if(nnz>free_size)
|
||||
{
|
||||
|
||||
@@ -160,7 +160,7 @@ class SparseVector
|
||||
Scalar& insert(Index i)
|
||||
{
|
||||
Index startId = 0;
|
||||
Index p = m_data.size() - 1;
|
||||
Index p = Index(m_data.size()) - 1;
|
||||
// TODO smart realloc
|
||||
m_data.resize(p+2,1);
|
||||
|
||||
|
||||
@@ -177,10 +177,8 @@ template<typename ExpressionType,int Mode>
|
||||
template<typename OtherDerived>
|
||||
void SparseTriangularView<ExpressionType,Mode>::solveInPlace(MatrixBase<OtherDerived>& other) const
|
||||
{
|
||||
eigen_assert(m_matrix.cols() == m_matrix.rows());
|
||||
eigen_assert(m_matrix.cols() == other.rows());
|
||||
eigen_assert(!(Mode & ZeroDiag));
|
||||
eigen_assert(Mode & (Upper|Lower));
|
||||
eigen_assert(m_matrix.cols() == m_matrix.rows() && m_matrix.cols() == other.rows());
|
||||
eigen_assert((!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower)));
|
||||
|
||||
enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
|
||||
|
||||
@@ -304,10 +302,8 @@ template<typename ExpressionType,int Mode>
|
||||
template<typename OtherDerived>
|
||||
void SparseTriangularView<ExpressionType,Mode>::solveInPlace(SparseMatrixBase<OtherDerived>& other) const
|
||||
{
|
||||
eigen_assert(m_matrix.cols() == m_matrix.rows());
|
||||
eigen_assert(m_matrix.cols() == other.rows());
|
||||
eigen_assert(!(Mode & ZeroDiag));
|
||||
eigen_assert(Mode & (Upper|Lower));
|
||||
eigen_assert(m_matrix.cols() == m_matrix.rows() && m_matrix.cols() == other.rows());
|
||||
eigen_assert( (!(Mode & ZeroDiag)) && bool(Mode & (Upper|Lower)));
|
||||
|
||||
// enum { copy = internal::traits<OtherDerived>::Flags & RowMajorBit };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user