use dynamic cast instead of c-style cast when casting from base type to derived class
This commit is contained in:
@ -67,7 +67,7 @@ void ComputeTempDeform::init()
|
||||
|
||||
auto fixes = modify->get_fix_by_style("^deform");
|
||||
if (fixes.size() > 0) {
|
||||
if (((FixDeform *) fixes[0])->remapflag == Domain::X_REMAP && comm->me == 0)
|
||||
if ((dynamic_cast<FixDeform *>( fixes[0]))->remapflag == Domain::X_REMAP && comm->me == 0)
|
||||
error->warning(FLERR, "Using compute temp/deform with inconsistent fix deform remap option");
|
||||
} else error->warning(FLERR, "Using compute temp/deform with no fix deform defined");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user