From e8b74f5777440559fc9702a9bddd32b9428972a3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 1 Oct 2019 11:51:03 +0200 Subject: -Werror,-Wreturn-std-move (clang-cl) Change-Id: I74d595e1480c421c5cad4095203270578acf9521 Reviewed-on: https://gerrit.libreoffice.org/79947 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sw/source/core/doc/docbm.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sw/source') diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index deb1048da936..0d4e4d321863 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -18,6 +18,8 @@ */ #include +#include + #include #include #include @@ -408,7 +410,7 @@ namespace { if(*ppCurrentMark == pMarkToFind) { - return ppCurrentMark; + return std::move(ppCurrentMark); } ++ppCurrentMark; } @@ -435,7 +437,7 @@ namespace break; if(IDocumentMarkAccess::GetType(**ppCurrentMark) == eType) { - return ppCurrentMark; + return std::move(ppCurrentMark); } } // reached a mark starting on a later start pos or the end of the -- cgit