summaryrefslogtreecommitdiff
path: root/binaryurp
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-08 09:13:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-08 17:10:07 +0200
commit953d8429c9c92ced2e3cb1222cadc29b6f1ef550 (patch)
treecc01e0e1f27e806657035ca361885b7f4450b79c /binaryurp
parente2ecb9a50acb7ab7c3287403104c6256d4369816 (diff)
loplugin:moveparam in binaryurp
Change-Id: Ia69e2307872813ede3339c0e9fbe1f2ae6a3508a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123246 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'binaryurp')
-rw-r--r--binaryurp/source/bridge.cxx10
-rw-r--r--binaryurp/source/bridge.hxx4
-rw-r--r--binaryurp/source/incomingreply.hxx4
-rw-r--r--binaryurp/source/incomingrequest.cxx6
-rw-r--r--binaryurp/source/incomingrequest.hxx2
-rw-r--r--binaryurp/source/proxy.cxx2
-rw-r--r--binaryurp/source/reader.cxx4
-rw-r--r--binaryurp/source/writer.cxx16
-rw-r--r--binaryurp/source/writer.hxx8
9 files changed, 28 insertions, 28 deletions
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 007e7e9440df..9730036ab4a8 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -584,7 +584,7 @@ void Bridge::decrementActiveCalls() noexcept {
bool Bridge::makeCall(
OUString const & oid, css::uno::TypeDescription const & member,
- bool setter, std::vector< BinaryAny > const & inArguments,
+ bool setter, std::vector< BinaryAny >&& inArguments,
BinaryAny * returnValue, std::vector< BinaryAny > * outArguments)
{
std::unique_ptr< IncomingReply > resp;
@@ -596,7 +596,7 @@ bool Bridge::makeCall(
OutgoingRequest(OutgoingRequest::KIND_NORMAL, member, setter));
sendRequest(
att.getTid(), oid, css::uno::TypeDescription(), member,
- inArguments);
+ std::move(inArguments));
pop.clear();
incrementCalls(true);
incrementActiveCalls();
@@ -873,7 +873,7 @@ css::uno::Reference< css::uno::XInterface > Bridge::getInstance(
sInstanceName,
css::uno::TypeDescription(
"com.sun.star.uno.XInterface::queryInterface"),
- false, inArgs, &ret, &outArgs);
+ false, std::move(inArgs), &ret, &outArgs);
throwException(bExc, ret);
auto const t = ret.getType();
if (t.get()->eTypeClass == typelib_TypeClass_VOID) {
@@ -1003,9 +1003,9 @@ void Bridge::sendRequest(
rtl::ByteSequence const & tid, OUString const & oid,
css::uno::TypeDescription const & type,
css::uno::TypeDescription const & member,
- std::vector< BinaryAny > const & inArguments)
+ std::vector< BinaryAny >&& inArguments)
{
- getWriter()->queueRequest(tid, oid, type, member, inArguments);
+ getWriter()->queueRequest(tid, oid, type, member, std::move(inArguments));
}
void Bridge::throwException(bool exception, BinaryAny const & value) {
diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx
index e0d5ce39b671..fa9c2c5abdc3 100644
--- a/binaryurp/source/bridge.hxx
+++ b/binaryurp/source/bridge.hxx
@@ -132,7 +132,7 @@ public:
bool makeCall(
OUString const & oid,
com::sun::star::uno::TypeDescription const & member, bool setter,
- std::vector< BinaryAny > const & inArguments, BinaryAny * returnValue,
+ std::vector< BinaryAny >&& inArguments, BinaryAny * returnValue,
std::vector< BinaryAny > * outArguments);
// Only called from reader_ thread:
@@ -204,7 +204,7 @@ private:
rtl::ByteSequence const & tid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type,
com::sun::star::uno::TypeDescription const & member,
- std::vector< BinaryAny > const & inArguments);
+ std::vector< BinaryAny >&& inArguments);
void throwException(bool exception, BinaryAny const & value);
diff --git a/binaryurp/source/incomingreply.hxx b/binaryurp/source/incomingreply.hxx
index b1ff6cb4d2eb..420c5169adde 100644
--- a/binaryurp/source/incomingreply.hxx
+++ b/binaryurp/source/incomingreply.hxx
@@ -34,9 +34,9 @@ private:
public:
IncomingReply(
bool theException, BinaryAny const & theReturnValue,
- std::vector< BinaryAny > const & theOutArguments):
+ std::vector< BinaryAny >&& theOutArguments):
exception(theException), returnValue(theReturnValue),
- outArguments(theOutArguments)
+ outArguments(std::move(theOutArguments))
{}
bool exception;
diff --git a/binaryurp/source/incomingrequest.cxx b/binaryurp/source/incomingrequest.cxx
index 62e88697769b..d75a61e46245 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -47,11 +47,11 @@ IncomingRequest::IncomingRequest(
OUString const & oid, css::uno::UnoInterfaceReference const & object,
css::uno::TypeDescription const & type, sal_uInt16 functionId,
bool synchronous, css::uno::TypeDescription const & member, bool setter,
- std::vector< BinaryAny > const & inArguments, bool currentContextMode,
+ std::vector< BinaryAny >&& inArguments, bool currentContextMode,
css::uno::UnoInterfaceReference const & currentContext):
bridge_(bridge), tid_(tid), oid_(oid), object_(object), type_(type),
member_(member), currentContext_(currentContext),
- inArguments_(inArguments), functionId_(functionId),
+ inArguments_(std::move(inArguments)), functionId_(functionId),
synchronous_(synchronous), setter_(setter), currentContextMode_(currentContextMode)
{
assert(bridge.is());
@@ -98,7 +98,7 @@ void IncomingRequest::execute() const {
bridge_->decrementActiveCalls();
try {
bridge_->getWriter()->queueReply(
- tid_, member_, setter_, isExc, ret, outArgs, false);
+ tid_, member_, setter_, isExc, ret, std::move(outArgs), false);
return;
} catch (const css::uno::RuntimeException & e) {
SAL_INFO("binaryurp", "caught " << e);
diff --git a/binaryurp/source/incomingrequest.hxx b/binaryurp/source/incomingrequest.hxx
index 6a79126b4f65..0423a04b6728 100644
--- a/binaryurp/source/incomingrequest.hxx
+++ b/binaryurp/source/incomingrequest.hxx
@@ -49,7 +49,7 @@ public:
com::sun::star::uno::TypeDescription const & type,
sal_uInt16 functionId, bool synchronous,
com::sun::star::uno::TypeDescription const & member, bool setter,
- std::vector< BinaryAny > const & inArguments, bool currentContextMode,
+ std::vector< BinaryAny >&& inArguments, bool currentContextMode,
com::sun::star::uno::UnoInterfaceReference const & currentContext);
~IncomingRequest();
diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx
index 0e5a92b68f9e..7602800cb34e 100644
--- a/binaryurp/source/proxy.cxx
+++ b/binaryurp/source/proxy.cxx
@@ -169,7 +169,7 @@ void Proxy::do_dispatch_throw(
oid_,
css::uno::TypeDescription(
const_cast< typelib_TypeDescription * >(member)),
- bSetter, inArgs, &ret, &outArgs))
+ bSetter, std::move(inArgs), &ret, &outArgs))
{
assert(ret.getType().get()->eTypeClass == typelib_TypeClass_EXCEPTION);
uno_any_construct(
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index b11b77ffe658..91f2e51a0f25 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -330,7 +330,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
std::unique_ptr< IncomingRequest > req(
new IncomingRequest(
bridge_, tid, oid, obj, type, functionId, synchronous, memberTd,
- bSetter, inArgs, ccMode, cc));
+ bSetter, std::move(inArgs), ccMode, cc));
if (synchronous) {
bridge_->incrementActiveCalls();
}
@@ -441,7 +441,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, sal_uInt8 flags1) {
case OutgoingRequest::KIND_NORMAL:
{
std::unique_ptr< IncomingReply > resp(
- new IncomingReply(exc, ret, outArgs));
+ new IncomingReply(exc, ret, std::move(outArgs)));
uno_threadpool_putJob(
bridge_->getThreadPool(), tid.getHandle(), resp.get(), nullptr,
false);
diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index 9fb609180e4a..250e251e8296 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -54,10 +54,10 @@ Writer::Item::Item(
rtl::ByteSequence const & theTid, OUString const & theOid,
css::uno::TypeDescription const & theType,
css::uno::TypeDescription const & theMember,
- std::vector< BinaryAny > const & inArguments,
+ std::vector< BinaryAny >&& inArguments,
css::uno::UnoInterfaceReference const & theCurrentContext):
tid(theTid), oid(theOid), type(theType), member(theMember),
- currentContext(theCurrentContext), arguments(inArguments),
+ currentContext(theCurrentContext), arguments(std::move(inArguments)),
request(true), setter(false), exception(false), setCurrentContextMode(false)
{}
@@ -65,10 +65,10 @@ Writer::Item::Item(
rtl::ByteSequence const & theTid,
css::uno::TypeDescription const & theMember, bool theSetter,
bool theException, BinaryAny const & theReturnValue,
- std::vector< BinaryAny > const & outArguments,
+ std::vector< BinaryAny >&& outArguments,
bool theSetCurrentContextMode):
tid(theTid), member(theMember),
- returnValue(theReturnValue), arguments(outArguments),
+ returnValue(theReturnValue), arguments(std::move(outArguments)),
request(false), setter(theSetter),
exception(theException), setCurrentContextMode(theSetCurrentContextMode)
{}
@@ -105,11 +105,11 @@ void Writer::queueRequest(
rtl::ByteSequence const & tid, OUString const & oid,
css::uno::TypeDescription const & type,
css::uno::TypeDescription const & member,
- std::vector< BinaryAny > const & inArguments)
+ std::vector< BinaryAny >&& inArguments)
{
css::uno::UnoInterfaceReference cc(current_context::get());
osl::MutexGuard g(mutex_);
- queue_.emplace_back(tid, oid, type, member, inArguments, cc);
+ queue_.emplace_back(tid, oid, type, member, std::move(inArguments), cc);
items_.set();
}
@@ -117,11 +117,11 @@ void Writer::queueReply(
rtl::ByteSequence const & tid,
com::sun::star::uno::TypeDescription const & member, bool setter,
bool exception, BinaryAny const & returnValue,
- std::vector< BinaryAny > const & outArguments, bool setCurrentContextMode)
+ std::vector< BinaryAny >&& outArguments, bool setCurrentContextMode)
{
osl::MutexGuard g(mutex_);
queue_.emplace_back(
- tid, member, setter, exception, returnValue, outArguments,
+ tid, member, setter, exception, returnValue, std::move(outArguments),
setCurrentContextMode);
items_.set();
}
diff --git a/binaryurp/source/writer.hxx b/binaryurp/source/writer.hxx
index 65945a66b6f3..42656000d0e3 100644
--- a/binaryurp/source/writer.hxx
+++ b/binaryurp/source/writer.hxx
@@ -66,13 +66,13 @@ public:
rtl::ByteSequence const & tid, OUString const & oid,
com::sun::star::uno::TypeDescription const & type,
com::sun::star::uno::TypeDescription const & member,
- std::vector< BinaryAny > const & inArguments);
+ std::vector< BinaryAny >&& inArguments);
void queueReply(
rtl::ByteSequence const & tid,
com::sun::star::uno::TypeDescription const & member, bool setter,
bool exception, BinaryAny const & returnValue,
- std::vector< BinaryAny > const & outArguments,
+ std::vector< BinaryAny >&& outArguments,
bool setCurrentContextMode);
void unblock();
@@ -107,7 +107,7 @@ private:
rtl::ByteSequence const & theTid, OUString const & theOid,
com::sun::star::uno::TypeDescription const & theType,
com::sun::star::uno::TypeDescription const & theMember,
- std::vector< BinaryAny > const & inArguments,
+ std::vector< BinaryAny >&& inArguments,
com::sun::star::uno::UnoInterfaceReference const &
theCurrentContext);
@@ -116,7 +116,7 @@ private:
rtl::ByteSequence const & theTid,
com::sun::star::uno::TypeDescription const & theMember,
bool theSetter, bool theException, BinaryAny const & theReturnValue,
- std::vector< BinaryAny > const & outArguments,
+ std::vector< BinaryAny >&& outArguments,
bool theSetCurrentContextMode);
rtl::ByteSequence tid; // request + reply