use auto type when assigning from cast or using new

This commit is contained in:
Axel Kohlmeyer
2022-04-10 18:16:36 -04:00
parent 6071376d42
commit 39b316729b
365 changed files with 1195 additions and 1233 deletions

View File

@ -169,7 +169,7 @@ void FixSMDIntegrateUlsph::initial_integrate(int /*vflag*/) {
* get smoothed velocities from ULSPH pair style
*/
Vector3d *smoothVel = (Vector3d *) force->pair->extract("smd/ulsph/smoothVel_ptr", itmp);
auto smoothVel = (Vector3d *) force->pair->extract("smd/ulsph/smoothVel_ptr", itmp);
if (xsphFlag) {
if (smoothVel == nullptr) {
@ -264,7 +264,7 @@ void FixSMDIntegrateUlsph::final_integrate() {
error->one(FLERR, "fix smd/integrate_ulsph failed to accesss num_neighs array");
}
Matrix3d *L = (Matrix3d *) force->pair->extract("smd/ulsph/velocityGradient_ptr", itmp);
auto L = (Matrix3d *) force->pair->extract("smd/ulsph/velocityGradient_ptr", itmp);
if (L == nullptr) {
error->one(FLERR, "fix smd/integrate_ulsph failed to accesss velocityGradient array");
}