diff options
author | Martin Drozdik <drozdik.svk@gmail.com> | 2015-02-16 18:18:46 +0900 |
---|---|---|
committer | Martin Drozdik <drozdik.svk@gmail.com> | 2015-02-16 18:18:46 +0900 |
commit | 64b29e06b9f23a496b28fab4b9e29680bc486cc1 (patch) | |
tree | 076ec0247929985fcc97fffa0a5a851637f78f8f /Eigen/src/Core/DenseStorage.h | |
parent | 1c0e8bcf09db440793abb02b3f5d68e1f4a27585 (diff) |
bug #956: Fixed bug in move constructors of DenseStorage which caused "moved-from" objects to be in an invalid state.
Diffstat (limited to 'Eigen/src/Core/DenseStorage.h')
-rw-r--r-- | Eigen/src/Core/DenseStorage.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Eigen/src/Core/DenseStorage.h b/Eigen/src/Core/DenseStorage.h index 4c37fadbd..b52b4dc7b 100644 --- a/Eigen/src/Core/DenseStorage.h +++ b/Eigen/src/Core/DenseStorage.h @@ -304,6 +304,8 @@ template<typename T, int _Options> class DenseStorage<T, Dynamic, Dynamic, Dynam , m_cols(std::move(other.m_cols)) { other.m_data = nullptr; + other.m_rows = 0; + other.m_cols = 0; } DenseStorage& operator=(DenseStorage&& other) { @@ -374,6 +376,7 @@ template<typename T, int _Rows, int _Options> class DenseStorage<T, Dynamic, _Ro , m_cols(std::move(other.m_cols)) { other.m_data = nullptr; + other.m_cols = 0; } DenseStorage& operator=(DenseStorage&& other) { @@ -440,6 +443,7 @@ template<typename T, int _Cols, int _Options> class DenseStorage<T, Dynamic, Dyn , m_rows(std::move(other.m_rows)) { other.m_data = nullptr; + other.m_rows = 0; } DenseStorage& operator=(DenseStorage&& other) { |