aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/SparseCore/SparseVector.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2013-07-14 11:56:08 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2013-07-14 11:56:08 +0200
commitee244d54f434a889cbd266b5da3e65ebc4e4960c (patch)
tree0fc3e12ff4a71ef0c8f9894b5afade4b0142b339 /Eigen/src/SparseCore/SparseVector.h
parent4bb0fff151d587958e5b0e5b4a8a6c6ce822b3db (diff)
SparseVector::assign: it is not always possible to reserve according to given non-zeros.
Diffstat (limited to 'Eigen/src/SparseCore/SparseVector.h')
-rw-r--r--Eigen/src/SparseCore/SparseVector.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/Eigen/src/SparseCore/SparseVector.h b/Eigen/src/SparseCore/SparseVector.h
index 869556176..6e7235007 100644
--- a/Eigen/src/SparseCore/SparseVector.h
+++ b/Eigen/src/SparseCore/SparseVector.h
@@ -56,7 +56,7 @@ enum {
template< typename Dest, typename Src,
int AssignmentKind = !bool(Src::IsVectorAtCompileTime) ? SVA_RuntimeSwitch
: (((Src::Flags&RowMajorBit)==RowMajorBit) && (Src::RowsAtCompileTime==1))
- || (((Src::Flags&RowMajorBit)==0) && (Src::ColsAtCompileTime==1)) ? SVA_Inner
+ || ((((Src::Flags&RowMajorBit)==0) && (Src::ColsAtCompileTime==1))) ? SVA_Inner
: SVA_Outer>
struct sparse_vector_assign_selector;
@@ -257,7 +257,6 @@ class SparseVector
inline SparseVector& operator=(const SparseMatrixBase<OtherDerived>& other)
{
SparseVector tmp(other.size());
- tmp.reserve(other.nonZeros());
internal::sparse_vector_assign_selector<SparseVector,OtherDerived>::run(tmp,other.derived());
this->swap(tmp);
return *this;