From fcc31cd0e0a6544a13dac0fdc66005d77f6f5cf9 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 7 Sep 2018 18:41:58 +0200 Subject: Revert "clang-tidy performance-move-const-arg" This reverts commit 3d604d1cd6cc70ef96782ef769f0479b509987a8. comments from sberg: I assume dropping the std::move from aCurSel(std::move(aSel)) is caused by performance-move-const-arg's warning "if std::move() is called with an argument of a trivially-copyable type" (). For my taste, that approach is too tightly tied to a class's current implementation details, something that may change over time. Imagine a trivially copyable class C with a raw pointer member (where the lifecycle of the pointed-to object is tracked by some higher-level, likely broken protocol). Now, that protocol is fixed and the raw pointer member is replaced with a std::shared_ptr. C is no longer trivially copyable, and the dropped std::move would turn out to be beneficial again. (Also, if Clang and clang-tidy did implement the fixed rules for trivially copyable classes from CWG1734/C++17, where a subset of a trivially copyable class's copy/move members may be deleted, the above rule to warn "if std::move() is called with an argument of a trivially-copyable type" would no longer make sense as written; consider a trivially copyable class whose copy ctor has been deleted.) Change-Id: Icb91610e50ed98b8f55fe6323bdfa48c8cb9b4b9 Reviewed-on: https://gerrit.libreoffice.org/60166 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/ppt/layoutfragmenthandler.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'oox') diff --git a/oox/source/ppt/layoutfragmenthandler.cxx b/oox/source/ppt/layoutfragmenthandler.cxx index 2f5f237dae90..8faa5108037f 100644 --- a/oox/source/ppt/layoutfragmenthandler.cxx +++ b/oox/source/ppt/layoutfragmenthandler.cxx @@ -43,7 +43,7 @@ namespace oox { namespace ppt { LayoutFragmentHandler::LayoutFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath, const SlidePersistPtr& pMasterPersistPtr) - : SlideFragmentHandler(rFilter, rFragmentPath, pMasterPersistPtr, Layout) + : SlideFragmentHandler(rFilter, rFragmentPath, std::move(pMasterPersistPtr), Layout) { } -- cgit