Avoid copy (where possible) when switching transports

This commit is contained in:
Alexey Rybalchenko
2018-06-06 18:10:42 +02:00
committed by Mohammad Al-Turany
parent 96e2076300
commit 653e82cab4
10 changed files with 66 additions and 59 deletions

View File

@@ -208,7 +208,7 @@ class FairMQDevice : public FairMQStateMachine
template<typename... Args>
FairMQMessagePtr NewMessageFor(const std::string& channel, int index, Args&&... args) const
{
return fChannels.at(channel).at(index).Transport()->CreateMessage(std::forward<Args>(args)...);
return fChannels.at(channel).at(index).NewMessage(std::forward<Args>(args)...);
}
template<typename T>