mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 17:49:36 +08:00
Fixed bug #647 by using smart_copy instead of bitwise memcpy.
This commit is contained in:
parent
a147500dee
commit
1472f4bc61
@ -51,8 +51,8 @@ class CompressedStorage
|
|||||||
CompressedStorage& operator=(const CompressedStorage& other)
|
CompressedStorage& operator=(const CompressedStorage& other)
|
||||||
{
|
{
|
||||||
resize(other.size());
|
resize(other.size());
|
||||||
memcpy(m_values, other.m_values, m_size * sizeof(Scalar));
|
internal::smart_copy(other.m_values, other.m_values + m_size, m_values);
|
||||||
memcpy(m_indices, other.m_indices, m_size * sizeof(Index));
|
internal::smart_copy(other.m_indices, other.m_indices + m_size, m_indices);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user