Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Cornu committed Dec 13, 2024
1 parent 07bb84f commit 85dcaaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/nrncvode/netcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ class HTList {
}
void Append(WatchCondition* wc) {
_list.push_back(wc);
wc->del.connect([=](WatchCondition* wc) {this->Remove(wc);});
wc->del.connect([=](WatchCondition* wc) { this->Remove(wc); });
}
void Remove(WatchCondition* wc) {
auto it = std::find(_list.begin(), _list.end(), wc);
Expand Down
15 changes: 5 additions & 10 deletions src/nrncvode/netcvode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5240,8 +5240,7 @@ void ConditionEvent::abandon_statistics(Cvode* cv) {
#endif
}

WatchCondition::WatchCondition(Point_process* pnt, double (*c)(Point_process*))
{
WatchCondition::WatchCondition(Point_process* pnt, double (*c)(Point_process*)) {
pnt_ = pnt;
c_ = c;
watch_index_ = 0; // For transfer, will be a small positive integer.
Expand All @@ -5253,11 +5252,9 @@ WatchCondition::~WatchCondition() {

// A WatchCondition but with different deliver
STECondition::STECondition(Point_process* pnt, double (*c)(Point_process*))
: WatchCondition(pnt, c) {
}
: WatchCondition(pnt, c) {}

STECondition::~STECondition() {
}
STECondition::~STECondition() {}

void WatchCondition::activate(double flag) {
Cvode* cv = NULL;
Expand Down Expand Up @@ -5455,8 +5452,7 @@ void Cvode::evaluate_conditions(NrnThread* nt) {
}
}
if (z.watch_list_) {
for (auto item = z.watch_list_->First(); item != z.watch_list_->End();
++item) {
for (auto item = z.watch_list_->First(); item != z.watch_list_->End(); ++item) {
(*item)->condition(this);
}
}
Expand Down Expand Up @@ -5484,8 +5480,7 @@ void Cvode::check_deliver(NrnThread* nt) {
}
}
if (z.watch_list_) {
for (auto item = z.watch_list_->First(); item != z.watch_list_->End();
++item) {
for (auto item = z.watch_list_->First(); item != z.watch_list_->End(); ++item) {
(*item)->check(nt, nt->_t);
}
}
Expand Down

0 comments on commit 85dcaaf

Please sign in to comment.