mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Require std::move when adding existing message to FairMQParts.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
65c19f07bf
commit
ac1da4db66
@@ -41,10 +41,10 @@ class FairMQParts
|
||||
/// Adds part (std::unique_ptr<FairMQMessage>&) to the container (move)
|
||||
/// @param msg unique pointer to FairMQMessage
|
||||
/// lvalue ref (move not required when passing argument)
|
||||
inline void AddPart(std::unique_ptr<FairMQMessage>& msg)
|
||||
{
|
||||
fParts.push_back(std::move(msg));
|
||||
}
|
||||
// inline void AddPart(std::unique_ptr<FairMQMessage>& msg)
|
||||
// {
|
||||
// fParts.push_back(std::move(msg));
|
||||
// }
|
||||
|
||||
/// Adds part (std::unique_ptr<FairMQMessage>&) to the container (move)
|
||||
/// @param msg unique pointer to FairMQMessage
|
||||
|
@@ -81,7 +81,7 @@ bool FairMQMultiplier::HandleMultipartData(FairMQParts& payload, int /*index*/)
|
||||
{
|
||||
FairMQMessagePtr msgCopy(fTransportFactory->CreateMessage());
|
||||
msgCopy->Copy(payload.At(k));
|
||||
parts.AddPart(msgCopy);
|
||||
parts.AddPart(std::move(msgCopy));
|
||||
}
|
||||
|
||||
Send(parts, fOutChannelNames.at(i), j);
|
||||
@@ -98,7 +98,7 @@ bool FairMQMultiplier::HandleMultipartData(FairMQParts& payload, int /*index*/)
|
||||
{
|
||||
FairMQMessagePtr msgCopy(fTransportFactory->CreateMessage());
|
||||
msgCopy->Copy(payload.At(k));
|
||||
parts.AddPart(msgCopy);
|
||||
parts.AddPart(std::move(msgCopy));
|
||||
}
|
||||
|
||||
Send(parts, fOutChannelNames.back(), i);
|
||||
|
Reference in New Issue
Block a user