use dynamic cast instead of c-style cast when casting from base type to derived class

This commit is contained in:
Axel Kohlmeyer
2022-04-10 18:18:06 -04:00
parent 39b316729b
commit 200b4f13c7
262 changed files with 669 additions and 676 deletions

View File

@ -545,8 +545,8 @@ void ComputeChunkAtom::init()
if ((idsflag == ONCE || lockcount) && !fixstore) {
id_fix = utils::strdup(id + std::string("_COMPUTE_STORE"));
fixstore = (FixStore *) modify->add_fix(fmt::format("{} {} STORE peratom 1 1",
id_fix, group->names[igroup]));
fixstore = dynamic_cast<FixStore *>( modify->add_fix(fmt::format("{} {} STORE peratom 1 1",
id_fix, group->names[igroup])));
}
if ((idsflag != ONCE && !lockcount) && fixstore) {