From 712c00a7709c11bdc94f69cab88b18e52ba6767f Mon Sep 17 00:00:00 2001 From: Sam Yates <halfflat@gmail.com> Date: Wed, 3 Aug 2016 16:52:16 +0200 Subject: [PATCH] Bugfix: non-artificial spikes not landing Incorrect source ids were being given to detectors; targets were then rightly ignoring the generated spikes. Also: small coding style compliance edits. --- src/cell_group.hpp | 2 +- src/communication/communicator.hpp | 8 ++++---- tests/unit/test_lexcmp.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/cell_group.hpp b/src/cell_group.hpp index 69a94a98..0143ce83 100644 --- a/src/cell_group.hpp +++ b/src/cell_group.hpp @@ -42,10 +42,10 @@ public: source_id_type source_id={gid_base_,0}; for (auto& d : c.detectors()) { - ++source_id.index; spike_sources_.push_back({ source_id, spike_detector_type(cell_, d.location, d.threshold, 0.f) }); + ++source_id.index; } } diff --git a/src/communication/communicator.hpp b/src/communication/communicator.hpp index cefffd4c..9336daeb 100644 --- a/src/communication/communicator.hpp +++ b/src/communication/communicator.hpp @@ -5,12 +5,12 @@ #include <vector> #include <random> -#include <spike.hpp> -#include <threading/threading.hpp> #include <algorithms.hpp> +#include <connection.hpp> #include <event_queue.hpp> - -#include "connection.hpp" +#include <spike.hpp> +#include <threading/threading.hpp> +#include <util/debug.hpp> namespace nest { namespace mc { diff --git a/tests/unit/test_lexcmp.cpp b/tests/unit/test_lexcmp.cpp index a02ac076..e2b5c476 100644 --- a/tests/unit/test_lexcmp.cpp +++ b/tests/unit/test_lexcmp.cpp @@ -62,8 +62,8 @@ class lexcmp_test_refmemfn { public: explicit lexcmp_test_refmemfn(int foo): foo_(foo) {} - const int &foo() const { return foo_; } - int &foo() { return foo_; } + const int& foo() const { return foo_; } + int& foo() { return foo_; } private: int foo_; -- GitLab