avmedia/source/viewer/mediawindow.cxx |    5 +++--
 include/avmedia/mediaitem.hxx         |    5 +++--
 include/avmedia/mediawindow.hxx       |    2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

New commits:
commit f5e3ad701e28e0b7d57e434d646a6191e2c1b0c0
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Jun 2 15:57:49 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Jun 2 17:43:58 2022 +0200

    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.gran...@collabora.co.uk>

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;
 

Reply via email to