From a8f33b3fd1ff5c802153821d9ca55416df0b6f3f Mon Sep 17 00:00:00 2001 From: Nicolas Cornu Date: Wed, 13 Dec 2023 10:39:27 +0100 Subject: [PATCH] Format + sonar --- src/nrniv/nonlinz.cpp | 7 +++---- src/sparse13/CMakeLists.txt | 10 ++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/nrniv/nonlinz.cpp b/src/nrniv/nonlinz.cpp index 10989d097a..747cdbcb82 100644 --- a/src/nrniv/nonlinz.cpp +++ b/src/nrniv/nonlinz.cpp @@ -195,7 +195,6 @@ int NonLinImp::solve(int curloc) { // mapping is already done there. NonLinImpRep::NonLinImpRep() { - int i, cnt; NrnThread* _nt = nrn_threads; Symbol* vsym = hoc_table_lookup("v", hoc_built_in_symlist); @@ -217,10 +216,10 @@ NonLinImpRep::NonLinImpRep() { n_ode_ = 0; for (NrnThreadMembList* tml = _nt->tml; tml; tml = tml->next) { Memb_list* ml = tml->ml; - i = tml->index; + int i = tml->index; nrn_ode_count_t s = memb_func[i].ode_count; if (s) { - cnt = (*s)(i); + int cnt = (*s)(i); n_ode_ += cnt * ml->nodecount; } } @@ -235,7 +234,7 @@ NonLinImpRep::NonLinImpRep() { v_.resize(neq_); deltavec_.resize(neq_); - for (i = 0; i < n_v_; ++i) { + for (int i = 0; i < n_v_; ++i) { // utilize nd->eqn_index in case of use_sparse13 later Node* nd = _nt->_v_node[i]; pv_[i] = nd->v_handle(); diff --git a/src/sparse13/CMakeLists.txt b/src/sparse13/CMakeLists.txt index d7a58f6702..b2adc31dc2 100644 --- a/src/sparse13/CMakeLists.txt +++ b/src/sparse13/CMakeLists.txt @@ -1,9 +1,3 @@ -add_library( - sparse13 STATIC - spalloc.cpp - spbuild.cpp - spfactor.cpp - spoutput.cpp - spsolve.cpp - sputils.cpp) +add_library(sparse13 STATIC spalloc.cpp spbuild.cpp spfactor.cpp spoutput.cpp spsolve.cpp + sputils.cpp) set_property(TARGET sparse13 PROPERTY POSITION_INDEPENDENT_CODE ON)