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

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Thu May 23 11:59:17 UTC 2019


 framework/source/services/pathsettings.cxx |   16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

New commits:
commit 04d3e31e383d814b214309d1dc28db62364015e7
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu May 23 10:43:12 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu May 23 13:58:17 2019 +0200

    PathInfo::takeOver does same as copy assignment op
    
    (but even better to actually use move assignment op)
    
    Change-Id: I6d9c4a9568ef03d84b7acd48a129d0c723c915cb
    Reviewed-on: https://gerrit.libreoffice.org/72820
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 74831fa22d79..8781a76994bb 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -17,6 +17,10 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <utility>
+
 #include <properties.h>
 #include <stdtypes.h>
 #include <helper/mischelper.hxx>
@@ -103,16 +107,6 @@ class PathSettings : private cppu::BaseMutex
                 , bIsReadonly   (false)
             {}
 
-            void takeOver(const PathInfo& rCopy)
-            {
-                sPathName      = rCopy.sPathName;
-                lInternalPaths = rCopy.lInternalPaths;
-                lUserPaths     = rCopy.lUserPaths;
-                sWritePath     = rCopy.sWritePath;
-                bIsSinglePath  = rCopy.bIsSinglePath;
-                bIsReadonly    = rCopy.bIsReadonly;
-            }
-
             /// an internal name describing this path
             OUString sPathName;
 
@@ -1223,7 +1217,7 @@ void PathSettings::impl_setPathValue(      sal_Int32      nID ,
     // If no exception occurs we can update our internal cache (means
     // we can overwrite pOrgPath !
     impl_storePath(aChangePath);
-    pOrgPath->takeOver(aChangePath);
+    *pOrgPath = std::move(aChangePath);
 }
 
 bool PathSettings::impl_isValidPath(const std::vector<OUString>& lPath) const


More information about the Libreoffice-commits mailing list