mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
feat(Parts)!: Refine and tweak
* Optimize appending another Parts container * Remove redundant/verbose comments * Change r-value args to move-only types into l-value args for readability * BREAKING CHANGE: Remove `AtRef(int)` and `AddPart(Message*)` member functions * Add various const overloads * Add `Empty()` and `Clear()` member functions * Add `noexcept` where applicable
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||
@@ -71,9 +71,9 @@ class Multiplier : public Device
|
||||
for (unsigned int j = 0; j < GetNumSubChannels(fOutChannelNames.at(i)); ++j) { // all subChannels in a channel
|
||||
Parts parts;
|
||||
|
||||
for (int k = 0; k < payload.Size(); ++k) {
|
||||
for (unsigned int k = 0; k < payload.Size(); ++k) {
|
||||
MessagePtr msgCopy(fTransportFactory->CreateMessage());
|
||||
msgCopy->Copy(payload.AtRef(k));
|
||||
msgCopy->Copy(*(payload.At(k)));
|
||||
parts.AddPart(std::move(msgCopy));
|
||||
}
|
||||
|
||||
@@ -86,9 +86,9 @@ class Multiplier : public Device
|
||||
for (unsigned int i = 0; i < lastChannelSize - 1; ++i) { // iterate over all except last subChannels of the last channel
|
||||
Parts parts;
|
||||
|
||||
for (int k = 0; k < payload.Size(); ++k) {
|
||||
for (unsigned int k = 0; k < payload.Size(); ++k) {
|
||||
MessagePtr msgCopy(fTransportFactory->CreateMessage());
|
||||
msgCopy->Copy(payload.AtRef(k));
|
||||
msgCopy->Copy(*(payload.At(k)));
|
||||
parts.AddPart(std::move(msgCopy));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user