libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx | 5 +++-- libreofficekit/source/gtk/lokdocview.cxx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-)
New commits: commit 154cffd87ee4a21b5c0c291f84c95d74cde2a143 Author: Noel Grandin <[email protected]> AuthorDate: Wed Jun 22 09:11:15 2022 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Thu Jun 23 08:53:17 2022 +0200 clang-tidy modernize-pass-by-value in libreofficekit Change-Id: I1a6b4eb804a8cc4eb5e67ae4bbf8f31863f323d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136273 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx index dc106e58dcb4..22aadbe2f337 100644 --- a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx +++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx @@ -16,6 +16,7 @@ #include <boost/property_tree/ptree.hpp> #include <o3tl/unreachable.hxx> +#include <utility> namespace { @@ -26,9 +27,9 @@ struct GtvCalcHeaderBarPrivateImpl { int m_nSize; std::string m_aText; - Header(int nSize, const std::string& rText) + Header(int nSize, std::string aText) : m_nSize(nSize), - m_aText(rText) + m_aText(std::move(aText)) { } }; diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx index 39f2281b0c7d..a092a1dbf1ab 100644 --- a/libreofficekit/source/gtk/lokdocview.cxx +++ b/libreofficekit/source/gtk/lokdocview.cxx @@ -11,6 +11,7 @@ #include <math.h> #include <string.h> #include <memory> +#include <utility> #include <vector> #include <string> #include <sstream> @@ -358,9 +359,9 @@ struct CallbackData std::string m_aPayload; LOKDocView* m_pDocView; - CallbackData(int nType, const std::string& rPayload, LOKDocView* pDocView) + CallbackData(int nType, std::string aPayload, LOKDocView* pDocView) : m_nType(nType), - m_aPayload(rPayload), + m_aPayload(std::move(aPayload)), m_pDocView(pDocView) {} };
