1
0
Fork 0

explicit referances in block processing

This commit is contained in:
Kevin Matz 2021-09-01 12:23:30 -04:00
parent 535cc66cd1
commit 6f4ce45413
1 changed files with 3 additions and 3 deletions

View File

@ -83,12 +83,12 @@ struct Block
* @param parent * @param parent
*/ */
void setParent(Message<Pdu> parent) { void setParent(Message<Pdu> parent) {
for (auto p : *pdu) for (auto & p : *pdu)
p->setParent(parent); p->setParent(parent);
} }
size_t streamSize() const override { size_t streamSize() const override {
size_t s = 0; size_t s = 0;
for (auto &child : *pdu) for (const auto & child : *pdu)
s += child->streamSize(); s += child->streamSize();
return s; return s;
} }
@ -106,7 +106,7 @@ struct Block
} }
} }
void oStream(Stream s) const override { void oStream(Stream s) const override {
for ( const auto & child : *pdu ) for (const auto & child : *pdu)
child->oStream(s); child->oStream(s);
}; };
}; };