[Libreoffice-commits] core.git: connectivity/source
Caolán McNamara
caolanm at redhat.com
Sat Nov 12 12:15:49 UTC 2016
connectivity/source/inc/file/fcode.hxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit c0081fe0f44610a9a78a764b02dff1879c263116
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Nov 11 20:50:52 2016 +0000
coverity#1371239 Missing move assignment operator
but if _MSC_VER need >= 2015
Change-Id: I730319702ddc589c4fc1d72b20fd200eacfa53e4
Reviewed-on: https://gerrit.libreoffice.org/30785
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx
index c346569..930ac9b 100644
--- a/connectivity/source/inc/file/fcode.hxx
+++ b/connectivity/source/inc/file/fcode.hxx
@@ -44,7 +44,18 @@ namespace connectivity
class OOO_DLLPUBLIC_FILE OCode
{
public:
+ //virtual dtor to allow this to be the root of the class hierarchy
virtual ~OCode() = default;
+#if !defined _MSC_VER || _MSC_VER >= 1900
+ //but that disables the default move ctor
+ OCode(OCode&&) = default;
+ //but that disables the rest of default ctors
+ OCode(const OCode&) = default;
+ OCode() = default;
+ //and same issue for the assignment operators
+ OCode& operator=(const OCode&) = default;
+ OCode& operator=(OCode&&) = default;
+#endif
inline static void * SAL_CALL operator new( size_t nSize )
{ return ::rtl_allocateMemory( nSize ); }
More information about the Libreoffice-commits
mailing list