use dynamic cast instead of c-style cast when casting from base type to derived class
This commit is contained in:
@ -172,7 +172,7 @@ void NEBSpin::run()
|
||||
if (fixes.size() != 1)
|
||||
error->all(FLERR,"NEBSpin requires use of exactly one fix neb/spin instance");
|
||||
|
||||
fneb = (FixNEBSpin *) fixes[0];
|
||||
fneb = dynamic_cast<FixNEBSpin *>( fixes[0]);
|
||||
if (verbose) numall =7;
|
||||
else numall = 4;
|
||||
memory->create(all,nreplica,numall,"neb:all");
|
||||
|
||||
Reference in New Issue
Block a user