cid#1371320 Missing move assignment operator

Change-Id: I34da999f516abedd65135f67e7479706e64e7b20
Reviewed-on: https://gerrit.libreoffice.org/28376
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Noel Grandin
2016-08-25 10:42:11 +02:00
committed by Noel Grandin
parent 17e137d899
commit 0e74870782
2 changed files with 18 additions and 0 deletions

View File

@@ -464,6 +464,23 @@ ORowSetValue& ORowSetValue::operator=(const ORowSetValue& _rRH)
return *this;
}
ORowSetValue& ORowSetValue::operator=(ORowSetValue&& _rRH)
{
if ( m_eTypeKind != _rRH.m_eTypeKind || !m_bNull)
free();
if(!_rRH.m_bNull)
{
m_aValue = _rRH.m_aValue;
memset(&_rRH.m_aValue, 0, sizeof(_rRH.m_aValue));
}
m_bBound = _rRH.m_bBound;
m_eTypeKind = _rRH.m_eTypeKind;
m_bSigned = _rRH.m_bSigned;
m_bNull = _rRH.m_bNull;
_rRH.m_bNull = true;
return *this;
}
ORowSetValue& ORowSetValue::operator=(const Date& _rRH)
{

View File

@@ -286,6 +286,7 @@ namespace connectivity
{ }
ORowSetValue& operator=(const ORowSetValue& _rRH);
ORowSetValue& operator=(ORowSetValue&& _rRH);
// simple types
ORowSetValue& operator=(bool _rRH);