summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-05-23 10:43:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-05-23 13:58:17 +0200
commit04d3e31e383d814b214309d1dc28db62364015e7 (patch)
tree7fcb684546bae2a4653707992fb6ff269412d621 /framework
parente1e9e2aa16f08a8fd9e38db706d63e8eceeda8d1 (diff)
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@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/pathsettings.cxx16
1 files changed, 5 insertions, 11 deletions
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