From b74d50003145f3805e3316a51c8be0222e680152 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 10 Nov 2022 18:59:54 +0100 Subject: [PATCH] Drop useless std::move of const object ...introduced with d8b60f77f389a248f98aa45592e6e1045baafbe1 "rtl_String->OString in DirectoryItem_Impl". (I came across this code with an upcoming loplugin:constmove that flags suspicious uses of std::move involving const-qualified types.) Change-Id: I3df2e6fb9dbf97adba6fbeda51d24cf025f5b207 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142565 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sal/osl/unx/file_misc.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index c411b78cc260..01842dc73154 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -330,9 +330,9 @@ oslFileError SAL_CALL osl_getNextDirectoryItem(oslDirectory pDirectory, pImpl = nullptr; } #ifdef _DIRENT_HAVE_D_TYPE - pImpl = new DirectoryItem_Impl(std::move(strFilePath), pEntry->d_type); + pImpl = new DirectoryItem_Impl(strFilePath, pEntry->d_type); #else - pImpl = new DirectoryItem_Impl(std::move(strFilePath)); + pImpl = new DirectoryItem_Impl(strFilePath); #endif /* _DIRENT_HAVE_D_TYPE */ *pItem = pImpl;