mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
bug #956: Fixed bug in move constructors of DenseStorage which caused "moved-from" objects to be in an invalid state.
This commit is contained in:
parent
1c0e8bcf09
commit
64b29e06b9
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user