Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit 6726f6d

Browse files
author
Nicolas Cornu
authored
Remove pointtype from global class (#247)
1 parent 82d90eb commit 6726f6d

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

coreneuron/coreneuron.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@ using DependencyTable = std::vector<std::vector<int>>;
7575
*/
7676
class CoreNeuron {
7777

78-
79-
/// Local to coreneuron, used to keep track of point process IDs
80-
int pointtype = 1; /* starts at 1 since 0 means not point in pnt_map*/
81-
8278
/**
8379
* map if mech is a point process
8480
* In the future only a field of Mechanism class
@@ -237,15 +233,6 @@ class CoreNeuron {
237233
return nrn_bbcore_write;
238234
}
239235

240-
241-
/**
242-
* Generate point process IDs for pnt_map starting at 1 (since 0 means no point process)
243-
* \return the next available point process ID
244-
*/
245-
int get_next_pointtype() {
246-
return pointtype++;
247-
}
248-
249236
};
250237

251238
extern CoreNeuron corenrn;

coreneuron/mechanism/register_mech.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,14 +359,15 @@ void register_destructor(Pfri d) {
359359
}
360360

361361
int point_reg_helper(Symbol* s2) {
362+
static int next_pointtype = 1; /* starts at 1 since 0 means not point in pnt_map */
362363
int type;
363364
type = nrn_get_mechtype(s2);
364365

365366
// No mechanism in the .dat files
366367
if (type == -1)
367368
return type;
368369

369-
corenrn.get_pnt_map()[type] = corenrn.get_next_pointtype();
370+
corenrn.get_pnt_map()[type] = next_pointtype++;
370371
corenrn.get_memb_func(type).is_point = 1;
371372

372373
return corenrn.get_pnt_map()[type];

0 commit comments

Comments
 (0)