summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-11 20:50:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-12 12:15:27 +0000
commitc0081fe0f44610a9a78a764b02dff1879c263116 (patch)
treea894ff7e0e678aad9aea0628839e57eea38aa398 /connectivity
parent737d324c900bc3c89e7d7f955b9b4b6725023679 (diff)
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@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/inc/file/fcode.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/connectivity/source/inc/file/fcode.hxx b/connectivity/source/inc/file/fcode.hxx
index c3465695fdb1..930ac9b4a4fb 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 ); }