use dynamic cast instead of c-style cast when casting from base type to derived class
This commit is contained in:
@ -595,7 +595,7 @@ int FixIMD::setmask()
|
||||
void FixIMD::init()
|
||||
{
|
||||
if (utils::strmatch(update->integrate_style,"^respa"))
|
||||
nlevels_respa = ((Respa *) update->integrate)->nlevels;
|
||||
nlevels_respa = (dynamic_cast<Respa *>( update->integrate))->nlevels;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user