Skip to content

Commit

Permalink
Sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Cornu committed Dec 14, 2024
1 parent 38eeb36 commit ca1a779
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/nrncvode/netcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class WatchCondition: public ConditionEvent {
class STECondition: public WatchCondition {
public:
STECondition(Point_process*, double (*)(Point_process*) = NULL);
virtual ~STECondition();
virtual ~STECondition() = default;
virtual void deliver(double, NetCvode*, NrnThread*);
virtual void pgvts_deliver(double t, NetCvode*);
virtual double value();
Expand Down
6 changes: 2 additions & 4 deletions src/nrncvode/netcvode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5253,8 +5253,6 @@ WatchCondition::~WatchCondition() {
STECondition::STECondition(Point_process* pnt, double (*c)(Point_process*))
: WatchCondition(pnt, c) {}

STECondition::~STECondition() {}

void WatchCondition::activate(double flag) {
Cvode* cv = NULL;
int id = 0;
Expand Down Expand Up @@ -5898,7 +5896,7 @@ void NetCvode::check_thresh(NrnThread* nt) { // for default method
}
}

for (auto* wl: wl_list_[nt->id]) {
for (const auto* wl: wl_list_[nt->id]) {
for (auto wc: *wl) {
wc->check(nt, nt->_t);
}
Expand All @@ -5915,7 +5913,7 @@ void nrn2core_transfer_WATCH(void (*cb)(int, int, int, int, int)) {
// should be revisited for possible simplification since wl_list now
// segregated by threads.
for (auto& htlists_of_thread: net_cvode_instance->wl_list_) {
for (auto* wl: htlists_of_thread) {
for (const auto* wl: htlists_of_thread) {
for (auto wc: *wl) {
nrn2core_transfer_WatchCondition(wc, cb);
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/signal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class signal_ {
}
}

void send(Args... args) {
void send(Args... args) const {
for (const auto& [i, f]: functors) {
std::invoke(f, args...);
}
Expand Down

0 comments on commit ca1a779

Please sign in to comment.