Skip to content

Commit 6dae0ac

Browse files
committed
format
1 parent 8c25f25 commit 6dae0ac

3 files changed

Lines changed: 5 additions & 14 deletions

File tree

src/neuron/container/pool.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,21 @@ class Pool {
105105
template <typename T, bool Mutex>
106106
T* Pool<T, Mutex>::allocate_pool(long count) {
107107
T* p{};
108-
if(subcount_ > 1){
108+
if (subcount_ > 1) {
109109
p = static_cast<T*>(
110110
nrn_cacheline_calloc(reinterpret_cast<void**>(&p), count * subcount_, sizeof(T)));
111-
}else{
111+
} else {
112112
p = new T[count];
113113
}
114114
return p;
115115
}
116116

117117
template <typename T, bool Mutex>
118118
void Pool<T, Mutex>::deallocate_pool(T* p) {
119-
if(subcount_ > 1){
119+
if (subcount_ > 1) {
120120
free(p);
121-
}else{
122-
delete []p;
121+
} else {
122+
delete[] p;
123123
}
124124
}
125125

src/nrncvode/tqueue.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ void TQueue::forall_callback(void (*f)(const TQItem*, int)) {
106106
}
107107
sptree_->apply_all(f, nullptr);
108108
for (TQItem* q = binq_->first(); q; q = binq_->next(q)) {
109-
printf("forall_callback: %p\n", q);
110109
f(q, 0);
111110
}
112111
MUTUNLOCK

test/unit_tests/container/pool.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ TEST_CASE("Pool: basic single-object alloc and free", "[Pool]") {
3939
REQUIRE(a != b);
4040
}
4141

42-
SECTION("hpfree allows reuse") {
43-
SimpleItem* a = pool.alloc();
44-
pool.hpfree(a);
45-
SimpleItem* b = pool.alloc();
46-
// After freeing, the same slot can be reused
47-
//REQUIRE(b == a);
48-
}
49-
5042
SECTION("nget tracks outstanding allocations") {
5143
REQUIRE(pool.nget() == 0);
5244
SimpleItem* a = pool.alloc();

0 commit comments

Comments
 (0)