From d159cfb8779268fa1ac718f4cca01fc7d5c5838c Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Thu, 24 Mar 2022 17:17:44 +0100 Subject: [PATCH] kraken: engine: non-const 'output' on listener --- src/engine/csv-engine-listener.cc | 4 ++++ src/engine/csv-engine-listener.hh | 1 + 2 files changed, 5 insertions(+) diff --git a/src/engine/csv-engine-listener.cc b/src/engine/csv-engine-listener.cc index 3d0e9d0..5c45817 100644 --- a/src/engine/csv-engine-listener.cc +++ b/src/engine/csv-engine-listener.cc @@ -10,6 +10,10 @@ csv::csv_type const& CsvEngineListener::output() const { return output_; } +csv::csv_type& CsvEngineListener::output() { + return output_; +} + void CsvEngineListener::on_acknowledgement(User user, UserOrderId id) { output_.emplace_back(csv::csv_line_type{ "A", diff --git a/src/engine/csv-engine-listener.hh b/src/engine/csv-engine-listener.hh index a33c172..a7174e5 100644 --- a/src/engine/csv-engine-listener.hh +++ b/src/engine/csv-engine-listener.hh @@ -14,6 +14,7 @@ struct CsvEngineListener : EngineListener { virtual ~CsvEngineListener(); csv::csv_type const& output() const; + csv::csv_type& output(); /// Called when a new trade or cancel order has been acknowledged. void on_acknowledgement(User user, UserOrderId id) override;