summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-06-02 15:57:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-06-02 17:43:58 +0200
commitf5e3ad701e28e0b7d57e434d646a6191e2c1b0c0 (patch)
treec5b258f85cf54a0d6d982d118ba562b5ff9485aa
parentclang-tidy modernize-pass-by-value in cppuhelper (diff)
downloadcore-f5e3ad701e28e0b7d57e434d646a6191e2c1b0c0.tar.gz
core-f5e3ad701e28e0b7d57e434d646a6191e2c1b0c0.zip
clang-tidy modernize-pass-by-value in avmedia
Change-Id: Ia579341951d3fa0a227cdfa888c380b032e2ee2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135312 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--avmedia/source/viewer/mediawindow.cxx5
-rw-r--r--include/avmedia/mediaitem.hxx5
-rw-r--r--include/avmedia/mediawindow.hxx2
3 files changed, 7 insertions, 5 deletions
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index c9b7f9bf20bb..df8110f54e0d 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -23,6 +23,7 @@
#include <bitmaps.hlst>
#include <strings.hrc>
#include <tools/urlobj.hxx>
+#include <utility>
#include <vcl/graph.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -459,9 +460,9 @@ void MediaWindow::dispatchInsertAVMedia(const css::uno::Reference<css::frame::XD
xDispatch->dispatch(aDispatchURL, aArgs);
}
-PlayerListener::PlayerListener(const std::function<void(const css::uno::Reference<css::media::XPlayer>&)> &rFn)
+PlayerListener::PlayerListener(std::function<void(const css::uno::Reference<css::media::XPlayer>&)> fn)
: PlayerListener_BASE(m_aMutex)
- , m_aFn(rFn)
+ , m_aFn(std::move(fn))
{
}
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index ab9418607cb7..5d033b7efba1 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -27,6 +27,7 @@
#include <string_view>
#include <o3tl/typed_flags_set.hxx>
+#include <utility>
namespace com::sun::star::embed { class XStorage; }
namespace com::sun::star::frame { class XModel; }
@@ -151,8 +152,8 @@ OUString GetFilename(OUString const& rSourceURL);
struct AVMEDIA_DLLPUBLIC MediaTempFile
{
OUString const m_TempFileURL;
- MediaTempFile(OUString const& rURL)
- : m_TempFileURL(rURL)
+ MediaTempFile(OUString aURL)
+ : m_TempFileURL(std::move(aURL))
{}
~MediaTempFile();
};
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index 8f48ba58cb89..e8515d77ffb4 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -66,7 +66,7 @@ namespace avmedia
using WeakComponentImplHelperBase::disposing;
public:
- PlayerListener(const std::function<void(const css::uno::Reference<css::media::XPlayer>&)> &rFn);
+ PlayerListener(std::function<void(const css::uno::Reference<css::media::XPlayer>&)> fn);
virtual void SAL_CALL dispose() override;
virtual ~PlayerListener() override;