[Libreoffice-commits] core.git: include/comphelper

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jul 26 10:30:46 UTC 2018


 include/comphelper/stl_types.hxx |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit bd8cb3ff962417e3f79ae19e7d802e433ea174ac
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Jul 26 09:55:57 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Jul 26 12:30:20 2018 +0200

    Iterators must be CopyAssignable
    
    ...so make sure the (implicitly defined) copy assignment op is not deleted and
    has sane semantics
    
    Change-Id: If34cb5bd1ef250505a4c876ab78aba2a3d5dfc21
    Reviewed-on: https://gerrit.libreoffice.org/58039
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx
index c3539bbe21a0..bf8cc2b70494 100644
--- a/include/comphelper/stl_types.hxx
+++ b/include/comphelper/stl_types.hxx
@@ -143,21 +143,17 @@ public:
     typedef size_t difference_type;
 
     OUStringBufferAppender(OUStringBuffer & i_rBuffer)
-        : m_rBuffer(i_rBuffer) { }
-    Self & operator=(Self const &)
-    {   // MSVC 2013 with non-debug runtime requires this in xutility.hpp:289
-        return *this;
-    }
+        : m_rBuffer(&i_rBuffer) { }
     Self & operator=(OUString const & i_rStr)
     {
-        m_rBuffer.append( i_rStr );
+        m_rBuffer->append( i_rStr );
         return *this;
     }
     Self & operator*() { return *this; } // so operator= works
     Self & operator++() { return *this; }
 
 private:
-    OUStringBuffer & m_rBuffer;
+    OUStringBuffer * m_rBuffer;
 };
 
 /** algorithm similar to std::copy, but inserts a separator between elements.


More information about the Libreoffice-commits mailing list