[Libreoffice-commits] core.git: connectivity/source include/connectivity
Noel Grandin
noel at peralex.com
Thu Aug 25 09:37:21 UTC 2016
connectivity/source/commontools/FValue.cxx | 17 +++++++++++++++++
include/connectivity/FValue.hxx | 1 +
2 files changed, 18 insertions(+)
New commits:
commit 0e74870782bd46a9654e63e19d081528fcccb6fa
Author: Noel Grandin <noel at peralex.com>
Date: Thu Aug 25 10:42:11 2016 +0200
cid#1371320 Missing move assignment operator
Change-Id: I34da999f516abedd65135f67e7479706e64e7b20
Reviewed-on: https://gerrit.libreoffice.org/28376
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 62861bf..974363f 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -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)
{
diff --git a/include/connectivity/FValue.hxx b/include/connectivity/FValue.hxx
index 55341f8..3964f3a 100644
--- a/include/connectivity/FValue.hxx
+++ b/include/connectivity/FValue.hxx
@@ -286,6 +286,7 @@ namespace connectivity
{ }
ORowSetValue& operator=(const ORowSetValue& _rRH);
+ ORowSetValue& operator=(ORowSetValue&& _rRH);
// simple types
ORowSetValue& operator=(bool _rRH);
More information about the Libreoffice-commits
mailing list