use auto type when assigning from cast or using new

This commit is contained in:
Axel Kohlmeyer
2022-04-10 18:16:36 -04:00
parent 6071376d42
commit 39b316729b
365 changed files with 1195 additions and 1233 deletions

View File

@ -72,7 +72,7 @@ void CreateBox::command(int narg, char **arg)
} else {
domain->triclinic = 1;
RegPrism *region = (RegPrism *) domain->regions[iregion];
auto region = dynamic_cast<RegPrism *>( domain->regions[iregion]);
domain->boxlo[0] = region->xlo;
domain->boxhi[0] = region->xhi;
domain->boxlo[1] = region->ylo;