diff --git a/arbor/backends/event_stream_base.hpp b/arbor/backends/event_stream_base.hpp index 0b3fb940a..0e62d6ddf 100644 --- a/arbor/backends/event_stream_base.hpp +++ b/arbor/backends/event_stream_base.hpp @@ -119,7 +119,7 @@ struct spike_event_stream_base: event_stream_base { arb_assert(div + evt.target < handles.size()); const auto& handle = handles[div + evt.target]; auto& stream = streams[handle.mech_id]; - stream.spikes_.push_back(spike_data(step, handle.mech_index, evt.time, evt.weight)); + stream.spikes_.emplace_back({step, handle.mech_index, evt.time, evt.weight}); stream.ev_spans_[step + 1]++; } ++cell; @@ -139,7 +139,7 @@ struct spike_event_stream_base: event_stream_base { std::sort(stream.spikes_.begin(), stream.spikes_.end()); // copy temporary deliverable_events into stream's ev_data_ stream.ev_data_.reserve(stream.spikes_.size()); - for (const auto& spike: stream.spikes_) stream.ev_data_.emplace_back(spike.mech_index, spike.weight); + for (const auto& spike: stream.spikes_) stream.ev_data_.emplace_back({spike.mech_index, spike.weight}); // delegate to derived class init: static cast necessary to access protected init() static_cast(stream).init(); // });