Skip to content

Commit 4f6ecd8

Browse files
matthiasrichterktf
authored andcommitted
Minor fix: correctly initializing through base class constructor
1 parent 9dd8182 commit 4f6ecd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Framework/Core/include/Framework/MessageContext.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ class MessageContext
242242
/// constructor taking header message by move and creating the payload message for the span
243243
template <typename ContextType>
244244
SpanObject(ContextType* context, FairMQMessagePtr&& headerMsg, const std::string& bindingChannel, int index, size_t nElements)
245+
: ContextObject(std::forward<FairMQMessagePtr>(headerMsg), bindingChannel)
245246
{
246247
// create the span object for the memory of the payload message
247248
// TODO: we probably also want to check consistency of the header message, i.e. payloadSize member
248249
auto payloadMsg = context->createMessage(bindingChannel, index, nElements * sizeof(T));
249250
mValue = value_type(reinterpret_cast<T*>(payloadMsg->GetData()), nElements);
250-
mParts.AddPart(std::move(headerMsg));
251+
assert(mParts.Size() == 1);
251252
mParts.AddPart(std::move(payloadMsg));
252-
mChannel = bindingChannel;
253253
}
254254
~SpanObject() override = default;
255255

0 commit comments

Comments
 (0)