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

@ -2038,7 +2038,7 @@ int DumpCustom::modify_param(int narg, char **arg)
std::string threshid = fmt::format("{}{}_DUMP_STORE",id,nthreshlast);
thresh_fixID[nthreshlast] = utils::strdup(threshid);
threshid += fmt::format(" {} STORE peratom 1 1", group->names[igroup]);
thresh_fix[nthreshlast] = (FixStore *) modify->add_fix(threshid);
thresh_fix[nthreshlast] = dynamic_cast<FixStore *>( modify->add_fix(threshid));
thresh_last[nthreshlast] = nthreshlast;
thresh_first[nthreshlast] = 1;