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

@ -305,8 +305,8 @@ void AnswerT::get_answers(double **f, double **tor) {
if (_ilist==nullptr) {
typedef struct { double x,y,z; } vec3d;
typedef struct { acctyp x,y,z,w; } vec4d_t;
vec3d *fp=reinterpret_cast<vec3d*>(&(f[0][0]));
vec4d_t *forcep=reinterpret_cast<vec4d_t*>(&(force[0]));
auto fp=reinterpret_cast<vec3d*>(&(f[0][0]));
auto forcep=reinterpret_cast<vec4d_t*>(&(force[0]));
#if (LAL_USE_OMP == 1)
#pragma omp parallel
@ -329,8 +329,8 @@ void AnswerT::get_answers(double **f, double **tor) {
fp[i].z+=forcep[i].z;
}
if (_rot) {
vec3d *torp=reinterpret_cast<vec3d*>(&(tor[0][0]));
vec4d_t *torquep=reinterpret_cast<vec4d_t*>(&(force[_inum*4]));
auto torp=reinterpret_cast<vec3d*>(&(tor[0][0]));
auto torquep=reinterpret_cast<vec4d_t*>(&(force[_inum*4]));
for (int i=ifrom; i<ito; i++) {
torp[i].x+=torquep[i].x;
torp[i].y+=torquep[i].y;