use dynamic cast instead of c-style cast when casting from base type to derived class
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user