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

@ -74,10 +74,10 @@ void WriteDump::command(int narg, char **arg)
// set multifile_override for DumpImage so that filename needs no "*"
if (strcmp(arg[1],"image") == 0)
((DumpImage *) dump)->multifile_override = 1;
(dynamic_cast<DumpImage *>( dump))->multifile_override = 1;
if (strcmp(arg[1],"cfg") == 0)
((DumpCFG *) dump)->multifile_override = 1;
(dynamic_cast<DumpCFG *>( dump))->multifile_override = 1;
if ((update->first_update == 0) && (comm->me == 0))
error->warning(FLERR,"Calling write_dump before a full system init.");