Skip to content

Commit

Permalink
setWopiFileInfo takes ownership of its arg
Browse files Browse the repository at this point in the history
make this more clear with a more typical explicit std::move pattern

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: I8dc7da1af59c6aa09c608d3cbfcd2c9167eab418
  • Loading branch information
caolanm authored and Ashod committed Dec 2, 2024
1 parent 02829a0 commit 0604618
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wsd/ClientSession.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class ClientSession final : public Session
}

/// Set WOPI fileinfo object
void setWopiFileInfo(std::unique_ptr<WopiStorage::WOPIFileInfo>& wopiFileInfo) { _wopiFileInfo = std::move(wopiFileInfo); }
void setWopiFileInfo(std::unique_ptr<WopiStorage::WOPIFileInfo> wopiFileInfo) { _wopiFileInfo = std::move(wopiFileInfo); }

/// Get requested tiles waiting for sending to the client
std::deque<TileDesc>& getRequestedTiles() { return _requestedTiles; }
Expand Down
2 changes: 1 addition & 1 deletion wsd/DocumentBroker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ DocumentBroker::updateSessionWithWopiInfo(const std::shared_ptr<ClientSession>&
}

// Pass the ownership to the client session.
session->setWopiFileInfo(wopiFileInfo);
session->setWopiFileInfo(std::move(wopiFileInfo));
session->setUserId(userId);
session->setUserName(username);
session->setUserExtraInfo(userExtraInfo);
Expand Down

0 comments on commit 0604618

Please sign in to comment.