[Libreoffice-commits] core.git: desktop/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Wed May 8 07:06:14 UTC 2019


 desktop/source/lib/lokclipboard.cxx |    5 ++---
 desktop/source/lib/lokclipboard.hxx |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 299e34275574d4fa0d9b175231f5cfdbb49c4f4c
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue May 7 21:10:19 2019 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed May 8 09:05:23 2019 +0200

    desktop: can pass by value in LOKTransferable
    
    Change-Id: Iba7c216f28700e8899d76942a4a0a8b77ed3c549
    Reviewed-on: https://gerrit.libreoffice.org/71930
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/desktop/source/lib/lokclipboard.cxx b/desktop/source/lib/lokclipboard.cxx
index e8c8644eff84..e5ba5fe9e80a 100644
--- a/desktop/source/lib/lokclipboard.cxx
+++ b/desktop/source/lib/lokclipboard.cxx
@@ -32,9 +32,8 @@ LOKTransferable::LOKTransferable(const char* pMimeType, const char* pData, std::
 {
 }
 
-LOKTransferable::LOKTransferable(const OUString& sMimeType,
-                                 const css::uno::Sequence<sal_Int8>& aSequence)
-    : m_aMimeType(sMimeType)
+LOKTransferable::LOKTransferable(OUString sMimeType, const css::uno::Sequence<sal_Int8>& aSequence)
+    : m_aMimeType(std::move(sMimeType))
     , m_aSequence(aSequence)
 {
 }
diff --git a/desktop/source/lib/lokclipboard.hxx b/desktop/source/lib/lokclipboard.hxx
index c8896d01e739..db2c7380bb25 100644
--- a/desktop/source/lib/lokclipboard.hxx
+++ b/desktop/source/lib/lokclipboard.hxx
@@ -42,7 +42,7 @@ class LOKTransferable : public cppu::WeakImplHelper<css::datatransfer::XTransfer
 
 public:
     LOKTransferable(const char* pMimeType, const char* pData, std::size_t nSize);
-    LOKTransferable(const OUString& sMimeType, const css::uno::Sequence<sal_Int8>& aSequence);
+    LOKTransferable(OUString sMimeType, const css::uno::Sequence<sal_Int8>& aSequence);
 
     css::uno::Any SAL_CALL getTransferData(const css::datatransfer::DataFlavor& rFlavor) override;
 


More information about the Libreoffice-commits mailing list