[Libreoffice-commits] core.git: sw/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jul 27 11:50:18 UTC 2018


 sw/inc/docary.hxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit d77d6983602cb468621b34e3561a85040f5a3018
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jul 27 10:09:25 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jul 27 13:49:48 2018 +0200

    -Werror=deprecated-copy (GCC trunk towards GCC 9)
    
    SwVectorModifyBase and its DestructorPolicy look like they beg for clean up, but
    it's not immediately clear to me what the best solution would be, so just mark
    the dangerous status quo with a TODO comment for now.
    
    Change-Id: I24164553baefb124969d4ac37247dabdaead0cd5
    Reviewed-on: https://gerrit.libreoffice.org/58169
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx
index c3c4724ab505..5c92a68d1c31 100644
--- a/sw/inc/docary.hxx
+++ b/sw/inc/docary.hxx
@@ -110,6 +110,14 @@ public:
                 delete *it;
     }
 
+    //TODO: These functions are apparently brittle (but the copy functions are actually used by the
+    // code; the move functions will be implicitly-defined as deleted anyway) and should probably
+    // only be used with DestructorPolicy::KeepELements:
+    SwVectorModifyBase(SwVectorModifyBase const &) = default;
+    SwVectorModifyBase(SwVectorModifyBase &&) = default;
+    SwVectorModifyBase & operator =(SwVectorModifyBase const &) = default;
+    SwVectorModifyBase & operator =(SwVectorModifyBase &&) = default;
+
     void DeleteAndDestroy(int aStartIdx, int aEndIdx)
     {
         if (aEndIdx < aStartIdx)


More information about the Libreoffice-commits mailing list