[Libreoffice-commits] core.git: codemaker/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jul 27 06:28:36 UTC 2018


 codemaker/source/cppumaker/cpputype.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 1a400fc39023bcf471a6d4448acbf1a2afcb274c
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jul 26 15:00:49 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jul 27 08:28:02 2018 +0200

    codemaker: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)
    
    ...by explicitly defaulting the copy/move functions (and, where needed in turn,
    also a default ctor) for classes that have a user-declared dtor that does
    nothing other than an implicitly-defined one would do, but needs to be user-
    declared because it is virtual and potentially serves as a key function to
    emit the vtable, or is non-public, etc.  (For LIBO_INTERNAL_ONLY, in cppumaker-
    genered code.)
    
    Change-Id: Ia13d945c10600f5793a3247f85a464170ede483d
    Reviewed-on: https://gerrit.libreoffice.org/58116
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index 6252a0ec603b..dd6476ff9f89 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -1162,6 +1162,12 @@ void InterfaceType::dumpDeclaration(FileStream & out)
     }
     out << "\n{\npublic:\n";
     inc();
+    out << "#if defined LIBO_INTERNAL_ONLY\n"
+        << indent() << id_ << "() = default;\n"
+        << indent() << id_ << "(" << id_ << " const &) = default;\n"
+        << indent() << id_ << "(" << id_ << " &&) = default;\n"
+        << indent() << id_ << " & operator =(" << id_ << " const &) = default;\n"
+        << indent() << id_ << " & operator =(" << id_ << " &&) = default;\n#endif\n\n";
     dumpAttributes(out);
     dumpMethods(out);
     out << "\n" << indent()


More information about the Libreoffice-commits mailing list