using emplace

This commit is contained in:
caheckman 2021-01-07 14:36:10 -05:00
parent 3644c120c0
commit 5f715d73e3
34 changed files with 101 additions and 103 deletions

View file

@ -73,11 +73,11 @@ void FlowBlock::addInEdge(FlowBlock *b,uint4 lab)
void FlowBlock::restoreNextInEdge(const Element *el,BlockMap &resolver)
{
intothis.push_back(BlockEdge());
intothis.emplace_back();
BlockEdge &inedge(intothis.back());
inedge.restoreXml(el,resolver);
while(inedge.point->outofthis.size() <= inedge.reverse_index)
inedge.point->outofthis.push_back(BlockEdge());
inedge.point->outofthis.emplace_back();
BlockEdge &outedge(inedge.point->outofthis[inedge.reverse_index]);
outedge.label = 0;
outedge.point = this;
@ -3271,7 +3271,7 @@ BlockSwitch::BlockSwitch(FlowBlock *ind)
void BlockSwitch::addCase(FlowBlock *switchbl,FlowBlock *bl,uint4 gt)
{
caseblocks.push_back(CaseOrder());
caseblocks.emplace_back();
CaseOrder &curcase( caseblocks.back() );
const FlowBlock *basicbl = bl->getFrontLeaf()->subBlock(0);
curcase.block = bl;