From 11467fa326896934a299712810b74aef6a373c6f Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 27 Jun 2019 07:42:09 +0200 Subject: Core: dynamically allocate the result of get_gas_used() get_gas_used() returns the volume of used gases. Currently, an array with MAX_CYLINDERS is passed in. If we want to make the number of cylinders dynamic, the function must use an arbitrarilly sized array. Therefore, return a dynamically allocated array and free it in the caller. Signed-off-by: Berthold Stoeger --- qt-models/yearlystatisticsmodel.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qt-models') diff --git a/qt-models/yearlystatisticsmodel.cpp b/qt-models/yearlystatisticsmodel.cpp index 5950ffd5d..d280808e9 100644 --- a/qt-models/yearlystatisticsmodel.cpp +++ b/qt-models/yearlystatisticsmodel.cpp @@ -3,6 +3,7 @@ #include "core/qthelper.h" #include "core/metrics.h" #include "core/statistics.h" +#include "core/dive.h" // For NUM_DIVEMODE class YearStatisticsItem : public TreeItem { Q_DECLARE_TR_FUNCTIONS(YearStatisticsItem) -- cgit v1.2.3-70-g09d2