mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-15 21:26:00 +08:00
add an assertion when inserting an already existing element
This commit is contained in:
parent
dc5b335f9f
commit
749317561c
@ -905,6 +905,7 @@ protected:
|
|||||||
m_data.value(p) = m_data.value(p-1);
|
m_data.value(p) = m_data.value(p-1);
|
||||||
--p;
|
--p;
|
||||||
}
|
}
|
||||||
|
eigen_assert((p<=startId || m_data.index(p-1)!=inner) && "you cannot insert an element that already exist, you must call coeffRef to this end");
|
||||||
|
|
||||||
m_innerNonZeros[outer]++;
|
m_innerNonZeros[outer]++;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user