diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-06-27 07:42:09 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-11-09 19:19:04 +0100 |
commit | 11467fa326896934a299712810b74aef6a373c6f (patch) | |
tree | d8c599a8b2b5a50e4dd189ff8ec108cac20c007d /qt-models | |
parent | f179ec033f39a6b774e6e6bb79f41771dfaf7e02 (diff) | |
download | subsurface-11467fa326896934a299712810b74aef6a373c6f.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/yearlystatisticsmodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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) |