From 88f919a0d062c7bcf7a92769715671cc734f6e38 Mon Sep 17 00:00:00 2001 From: Giovanni La Mura <giovanni.lamura@inaf.it> Date: Tue, 12 Mar 2024 10:58:54 +0100 Subject: [PATCH] Remove redundant definition of VINTS vector --- src/cluster/cluster.cpp | 2 +- src/include/Commons.h | 2 -- src/libnptm/Commons.cpp | 4 ---- src/libnptm/clu_subs.cpp | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/cluster/cluster.cpp b/src/cluster/cluster.cpp index 7d41b25e..0f6737ac 100644 --- a/src/cluster/cluster.cpp +++ b/src/cluster/cluster.cpp @@ -638,7 +638,7 @@ void cluster(string config_file, string data_file, string output_path) { real(c1->sas[i226 - 1][1][1]), imag(c1->sas[i226 - 1][1][1]) ); for (int j225 = 0; j225 < 16; j225++) { // QUESTION: check that 16 is a fixed dimension - c1ao->vint[j225] = c1ao->vints[i226 - 1][j225]; + c1ao->vint[j225] = c1->vints[i226 - 1][j225]; } // j225 loop mmulc(c1ao->vint, cmullr, cmul); fprintf(output, " MULS\n"); diff --git a/src/include/Commons.h b/src/include/Commons.h index 1994a292..bd80be4c 100644 --- a/src/include/Commons.h +++ b/src/include/Commons.h @@ -237,8 +237,6 @@ public: //! \brief QUESTION: definition? dcomplex *vintm; //! \brief QUESTION: definition? - dcomplex **vints; - //! \brief QUESTION: definition? dcomplex *vintt; //! \brief QUESTION: definition? dcomplex **fsac; diff --git a/src/libnptm/Commons.cpp b/src/libnptm/Commons.cpp index c88ff579..1041b0a7 100644 --- a/src/libnptm/Commons.cpp +++ b/src/libnptm/Commons.cpp @@ -131,8 +131,6 @@ C1_AddOns::C1_AddOns(C4 *c4) { vint = new dcomplex[16](); // QUESTION: is dimension 16 generally fixed? vintm = new dcomplex[16](); vintt = new dcomplex[16](); - vints = new dcomplex*[nsph]; - for (int vi = 0; vi < nsph; vi++) vints[vi] = new dcomplex[16](); fsac = new dcomplex*[2]; sac = new dcomplex*[2]; fsacm = new dcomplex*[2]; @@ -169,8 +167,6 @@ C1_AddOns::~C1_AddOns() { delete[] vint; delete[] vintm; delete[] vintt; - for (int vi = nsph - 1; vi > -1; vi--) delete[] vints[vi]; - delete[] vints; for (int fi = 1; fi > -1; fi--) { delete[] fsac[fi]; delete[] sac[fi]; diff --git a/src/libnptm/clu_subs.cpp b/src/libnptm/clu_subs.cpp index 72cac991..b004cc11 100644 --- a/src/libnptm/clu_subs.cpp +++ b/src/libnptm/clu_subs.cpp @@ -1793,7 +1793,7 @@ void scr2( for (int ipo2 = 1; ipo2 <= 2; ipo2++) { for (int jpo2 = 1; jpo2 <= 2; jpo2++) { j++; - c1ao->vints[i24 - 1][j - 1] = c1->sas[i24 - 1][jpo2 - 1][ipo2 - 1] * cc * cfsq; + c1->vints[i24 - 1][j - 1] = c1->sas[i24 - 1][jpo2 - 1][ipo2 - 1] * cc * cfsq; } // jpo2 loop } // ipo2 loop } // jpo1 loop -- GitLab