From 0604618f3b69a4a5e39b356d04ac233647604900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 6 Nov 2024 14:40:13 +0000 Subject: [PATCH] setWopiFileInfo takes ownership of its arg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit make this more clear with a more typical explicit std::move pattern Signed-off-by: Caolán McNamara Change-Id: I8dc7da1af59c6aa09c608d3cbfcd2c9167eab418 --- wsd/ClientSession.hpp | 2 +- wsd/DocumentBroker.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wsd/ClientSession.hpp b/wsd/ClientSession.hpp index 8b3ce2984d11f..68f564d72a929 100644 --- a/wsd/ClientSession.hpp +++ b/wsd/ClientSession.hpp @@ -178,7 +178,7 @@ class ClientSession final : public Session } /// Set WOPI fileinfo object - void setWopiFileInfo(std::unique_ptr& wopiFileInfo) { _wopiFileInfo = std::move(wopiFileInfo); } + void setWopiFileInfo(std::unique_ptr wopiFileInfo) { _wopiFileInfo = std::move(wopiFileInfo); } /// Get requested tiles waiting for sending to the client std::deque& getRequestedTiles() { return _requestedTiles; } diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp index 26cb2a4083af3..b0c266022f97d 100644 --- a/wsd/DocumentBroker.cpp +++ b/wsd/DocumentBroker.cpp @@ -1436,7 +1436,7 @@ DocumentBroker::updateSessionWithWopiInfo(const std::shared_ptr& } // Pass the ownership to the client session. - session->setWopiFileInfo(wopiFileInfo); + session->setWopiFileInfo(std::move(wopiFileInfo)); session->setUserId(userId); session->setUserName(username); session->setUserExtraInfo(userExtraInfo);