diff --git a/src/nrncvode/cvodeobj.cpp b/src/nrncvode/cvodeobj.cpp index 43396a3c63..89b2ca3e58 100644 --- a/src/nrncvode/cvodeobj.cpp +++ b/src/nrncvode/cvodeobj.cpp @@ -970,7 +970,7 @@ void Cvode::maxstate(double* pd) { void Cvode::maxacor(double* pd) { if (maxacor_) { - for (NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) { + for (const NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) { double* m = n_vector_data(maxacor_, nt->id); int n = ctd_[nt->id].nvsize_; int o = ctd_[nt->id].nvoffset_; diff --git a/src/nrncvode/netcvode.cpp b/src/nrncvode/netcvode.cpp index ab80d10449..0110299653 100644 --- a/src/nrncvode/netcvode.cpp +++ b/src/nrncvode/netcvode.cpp @@ -1460,7 +1460,6 @@ bool NetCvode::init_global() { structure_change_cnt_ = structure_change_cnt; matrix_change_cnt_ = -1; playrec_change_cnt_ = 0; - NrnThread* _nt; // We copy Memb_list* into cml->ml below. At the moment this CVode code // generates its own complicated set of Memb_list* that operate in // list-of-handles mode instead of referring to contiguous sets of values. @@ -3963,7 +3962,6 @@ void NetCvode::re_init(double t) { } void NetCvode::fornetcon_prepare() { - NrnThread* nt; NrnThreadMembList* tml; if (fornetcon_change_cnt_ == structure_change_cnt) { return; diff --git a/src/nrniv/nrncore_write/data/cell_group.cpp b/src/nrniv/nrncore_write/data/cell_group.cpp index e93f9bfea8..85fb6f8607 100644 --- a/src/nrniv/nrncore_write/data/cell_group.cpp +++ b/src/nrniv/nrncore_write/data/cell_group.cpp @@ -552,9 +552,8 @@ void CellGroup::mk_tml_with_art(neuron::model_sorted_token const& cache_token, C size_t CellGroup::get_mla_rankbytes(CellGroup* cellgroups_) { size_t mla_rankbytes = 0; size_t nbytes; - NrnThread* nt; NrnThreadMembList* tml; - for (NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) { + for (const NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) { size_t threadbytes = 0; size_t npnt = 0; size_t nart = 0; diff --git a/src/nrniv/savstate.cpp b/src/nrniv/savstate.cpp index c3fcd7199f..bc6e9f2b6a 100644 --- a/src/nrniv/savstate.cpp +++ b/src/nrniv/savstate.cpp @@ -597,7 +597,7 @@ void SaveState::save() { if (!check(false)) { alloc(); } - for (NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) { + for (const NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) { assert(t == nt->_t); } t_ = t; @@ -1192,7 +1192,6 @@ void SaveState::free_tq() { void SaveState::alloc_tq() { free_tq(); tqcnt_ = 0; - NrnThread* nt; for (NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) { TQueue* tq = net_cvode_instance_event_queue(nt); this_savestate = this; diff --git a/src/nrnoc/multicore.cpp b/src/nrnoc/multicore.cpp index ffe5bedd1d..7827bce1b3 100644 --- a/src/nrnoc/multicore.cpp +++ b/src/nrnoc/multicore.cpp @@ -766,7 +766,7 @@ void reorder_secorder() { in either case, we can then point to v, d, rhs in proper node order */ - for (NrnThread* _nt: for_threads(nrn_threads, nrn_nthread)) + for (const NrnThread* _nt: for_threads(nrn_threads, nrn_nthread)) for (inode = 0; inode < _nt->end; ++inode) { _nt->_v_node[inode]->_classical_parent = _nt->_v_parent[inode]; } diff --git a/src/nrnoc/treeset.cpp b/src/nrnoc/treeset.cpp index e4a6466277..e24a45b196 100644 --- a/src/nrnoc/treeset.cpp +++ b/src/nrnoc/treeset.cpp @@ -1793,7 +1793,7 @@ int nrn_modeltype(void) { type = 0; if (nrn_global_ncell > 0) { type = 1; - for (NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) + for (const NrnThread* nt: for_threads(nrn_threads, nrn_nthread)) if (nt->_ecell_memb_list) { type = 2; }