* src/sanity/style.test: Diagnose superfluous constructs such
as `if (x) delete x;'. * iface/gspn/gspn.cc, iface/gspn/ssp.cc, src/ltlvisit/basicreduce.cc, src/tgba/tgba.cc, src/tgba/tgbaproduct.cc, src/tgbaalgos/magic.cc, src/tgbatest/ltl2tgba.cc: Remove such constructs.
This commit is contained in:
parent
4654da9ab5
commit
55014e9dcc
9 changed files with 62 additions and 71 deletions
|
|
@ -509,11 +509,6 @@ namespace spot
|
|||
destroy(*i);
|
||||
}
|
||||
|
||||
/*
|
||||
delete tmpFG;
|
||||
tmpFG = 0;
|
||||
*/
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -525,22 +520,21 @@ namespace spot
|
|||
tmpOther->push_back(unop::instance(unop::X,
|
||||
multop::instance(mo->op(),
|
||||
tmpX)));
|
||||
else if (tmpX)
|
||||
else
|
||||
delete tmpX;
|
||||
|
||||
|
||||
if (tmpU && !tmpU->empty())
|
||||
tmpOther->push_back(multop::instance(mo->op(), tmpU));
|
||||
else if (tmpU)
|
||||
else
|
||||
delete tmpU;
|
||||
|
||||
|
||||
if (tmpR && !tmpR->empty())
|
||||
tmpOther->push_back(multop::instance(mo->op(), tmpR));
|
||||
else if (tmpR)
|
||||
else
|
||||
delete tmpR;
|
||||
|
||||
|
||||
if (tmpGF && !tmpGF->empty())
|
||||
{
|
||||
formula* ftmp
|
||||
|
|
@ -550,7 +544,7 @@ namespace spot
|
|||
tmpGF)));
|
||||
tmpOther->push_back(ftmp);
|
||||
}
|
||||
else if (tmpGF)
|
||||
else
|
||||
delete tmpGF;
|
||||
|
||||
|
||||
|
|
@ -569,14 +563,13 @@ namespace spot
|
|||
multop::instance(mo->op(), tmpFG));
|
||||
tmpOther->push_back(ftmp);
|
||||
}
|
||||
else if (tmpFG)
|
||||
else
|
||||
delete tmpFG;
|
||||
|
||||
|
||||
result_ = multop::instance(op, tmpOther);
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue