use dynamic cast instead of c-style cast when casting from base type to derived class
This commit is contained in:
@ -67,7 +67,7 @@ void VerletLRTIntel::init()
|
||||
{
|
||||
Verlet::init();
|
||||
|
||||
_intel_kspace = (PPPMIntel*)(force->kspace_match("^pppm/intel", 0));
|
||||
_intel_kspace = dynamic_cast<PPPMIntel*>(force->kspace_match("^pppm/intel", 0));
|
||||
|
||||
#ifndef LMP_INTEL_USELRT
|
||||
error->all(FLERR,
|
||||
|
||||
Reference in New Issue
Block a user