use the mkshared constructor
This commit is contained in:
parent
0afb725606
commit
c30d6a33f2
|
@ -92,16 +92,16 @@ struct Block
|
|||
}
|
||||
void iStream(Stream s) override {
|
||||
while(s->good()) {
|
||||
Message<T> p(new T());
|
||||
p->iStream(s);
|
||||
if (s->fail()) // stream failed during pdu read
|
||||
break;
|
||||
if (p->stream()->fail()) // pdu buffer failed
|
||||
continue;
|
||||
if (!pdu->empty()) // set inheritee
|
||||
p->setInherit(pdu->back());
|
||||
pdu->push_back(p); // add to block
|
||||
}
|
||||
auto p = std::make_shared<T>();
|
||||
p->iStream(s);
|
||||
if (s->fail()) // stream failed during pdu read
|
||||
break;
|
||||
if (p->stream()->fail()) // pdu buffer failed
|
||||
continue;
|
||||
if (!pdu->empty()) // set inheritee
|
||||
p->setInherit(pdu->back());
|
||||
pdu->push_back(p); // add to block
|
||||
}
|
||||
}
|
||||
void oStream(Stream s) const override {
|
||||
for (const auto & child : *pdu)
|
||||
|
|
Loading…
Reference in New Issue