Drop useless std::move of const object

...introduced with d8b60f77f3 "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 <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2022-11-10 18:59:54 +01:00
parent be89fcabd3
commit b74d500031

View file

@ -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;