mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
introduce a smart_copy internal function and fix sparse matrices with non POD scalar type
This commit is contained in:
@@ -218,8 +218,8 @@ class CompressedStorage
|
||||
Index* newIndices = new Index[size];
|
||||
size_t copySize = std::min(size, m_size);
|
||||
// copy
|
||||
memcpy(newValues, m_values, copySize * sizeof(Scalar));
|
||||
memcpy(newIndices, m_indices, copySize * sizeof(Index));
|
||||
internal::smart_copy(m_values, m_values+copySize, newValues);
|
||||
internal::smart_copy(m_indices, m_indices+copySize, newIndices);
|
||||
// delete old stuff
|
||||
delete[] m_values;
|
||||
delete[] m_indices;
|
||||
|
||||
Reference in New Issue
Block a user