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

Commit f0694c1

Browse files
jorblancoaBlanco Alonso Jorge
andauthored
Bugfix: num_segments() always returns 0 (#315)
Co-authored-by: Blanco Alonso Jorge <[email protected]>
1 parent eabc782 commit f0694c1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

coreneuron/io/nrnsection_mapping.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@ struct SecMapping {
4242

4343
/** @brief return number of segments in section list */
4444
size_t num_segments() const {
45-
size_t count = 0;
46-
std::accumulate(secmap.begin(), secmap.end(), 0,
45+
return std::accumulate(secmap.begin(), secmap.end(), 0,
4746
[](int psum, const auto& item) { return psum + item.second.size(); });
48-
return count;
4947
}
5048

5149
/** @brief add section to associated segment */

0 commit comments

Comments
 (0)