From 1472f4bc61192e4ffd06c6baf419747d7cc4c90b Mon Sep 17 00:00:00 2001 From: Pavel Holoborodko Date: Sun, 25 Aug 2013 18:02:07 +0900 Subject: [PATCH] Fixed bug #647 by using smart_copy instead of bitwise memcpy. --- Eigen/src/SparseCore/CompressedStorage.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/SparseCore/CompressedStorage.h b/Eigen/src/SparseCore/CompressedStorage.h index 3321fab4a..10d516a66 100644 --- a/Eigen/src/SparseCore/CompressedStorage.h +++ b/Eigen/src/SparseCore/CompressedStorage.h @@ -51,8 +51,8 @@ class CompressedStorage CompressedStorage& operator=(const CompressedStorage& other) { resize(other.size()); - memcpy(m_values, other.m_values, m_size * sizeof(Scalar)); - memcpy(m_indices, other.m_indices, m_size * sizeof(Index)); + internal::smart_copy(other.m_values, other.m_values + m_size, m_values); + internal::smart_copy(other.m_indices, other.m_indices + m_size, m_indices); return *this; }