subsurface/core
Berthold Stoeger 9cf753fa56 core: refactor per_cylinder_mean_depth()
This function had a horrendous interface: The caller would have to
allocate two arrays of the correct size to be filled with data.
The callee couldn't even check the size, because the data was passed
as raw pointers.

Instead, use std::vector<>, construct everything in the called
function and do size-sanity check in the calling function.

Use depth_t and duration_t instead of plain integers to represent
mean depth and time.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-12-17 13:58:27 +13:00
..
settings Make the "Save dive data as subtitles" feature more configurable. 2024-10-27 01:37:04 +13:00
subsurface-qt core: turn picture-table into std::vector<> 2024-08-13 19:28:30 +02:00
android.cpp core: move startup function declarations to subsurfacestartup.h 2024-08-13 19:28:30 +02:00
btdiscovery.cpp Bluetooth: Add Mares Sirius to known devices 2024-11-26 22:29:13 +13:00
btdiscovery.h import: turn C-string in device_data_t into std::strings 2024-08-13 19:28:30 +02:00
checkcloudconnection.cpp preferences: use std::string in struct preferences 2024-08-13 19:28:30 +02:00
checkcloudconnection.h
cloudstorage.cpp preferences: use std::string in struct preferences 2024-08-13 19:28:30 +02:00
cloudstorage.h
CMakeLists.txt Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
cochran.cpp Cleanup: Fix Warnings in MacOS build. 2024-09-28 23:50:55 +12:00
cochran.h
color.cpp
color.h cleanup: remove enum typedef in color.h 2024-08-13 19:28:30 +02:00
compressibility.r
configuredivecomputer.cpp import: turn C-string in device_data_t into std::strings 2024-08-13 19:28:30 +02:00
configuredivecomputer.h computer configuration: use value semantics for DeviceDetails 2024-03-24 17:53:19 +01:00
configuredivecomputerthreads.cpp computer configuration: use value semantics for DeviceDetails 2024-03-24 17:53:19 +01:00
configuredivecomputerthreads.h computer configuration: use value semantics for DeviceDetails 2024-03-24 17:53:19 +01:00
connectionlistmodel.cpp
connectionlistmodel.h
datatrak.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
datatrak.h core: turn a memblock in the parser to std::string 2024-03-10 11:01:42 +13:00
deco.cpp core: pass depth_t to depth_to_* functions 2024-12-17 13:58:27 +13:00
deco.h core: pass depth_t to depth_to_* functions 2024-12-17 13:58:27 +13:00
device.cpp core: move has_dive() function into struct divelist 2024-08-13 19:28:30 +02:00
device.h core: remove device-fingerprint C access code 2024-08-13 19:28:30 +02:00
devicedetails.cpp computer configuration: use value semantics for DeviceDetails 2024-03-24 17:53:19 +01:00
devicedetails.h computer configuration: use value semantics for DeviceDetails 2024-03-24 17:53:19 +01:00
dive.cpp core: refactor per_cylinder_mean_depth() 2024-12-17 13:58:27 +13:00
dive.h core: refactor per_cylinder_mean_depth() 2024-12-17 13:58:27 +13:00
divecomputer.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
divecomputer.h Planner: Improve Gas Handling in CCR Mode. 2024-08-26 12:36:31 +12:00
divefilter.cpp core: turn C dive-table into an owning table 2024-08-13 19:28:30 +02:00
divefilter.h map: use value semantics for MapLocation 2024-08-13 19:28:30 +02:00
divelist.cpp core: turn M_OR_FT macro into a function 2024-12-17 13:58:27 +13:00
divelist.h core: fix undo of dive merging 2024-09-03 18:20:48 +12:00
divelog.cpp core: move merge_dives() functios to struct dive_table 2024-08-13 19:28:30 +02:00
divelog.h core: move process_import_dives() and related functions to divelog 2024-08-13 19:28:30 +02:00
divelogexportlogic.cpp Export: Cleanup jqplot Module References. 2024-10-22 10:23:29 +13:00
divelogexportlogic.h
divemode.h Planner: Improve Gas Handling in CCR Mode. 2024-08-26 12:36:31 +12:00
divesite.cpp core: move divesite_has_gps_information() to struct dive_site 2024-08-13 19:28:30 +02:00
divesite.h core: move divesite_has_gps_information() to struct dive_site 2024-08-13 19:28:30 +02:00
divesitehelpers.cpp core: convert taxonomy.c to C++ 2024-08-13 19:28:30 +02:00
divesitehelpers.h
divesitetable.h core: turn C dive-table into an owning table 2024-08-13 19:28:30 +02:00
divesoft.cpp Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
downloadfromdcthread.cpp core: turn C dive-table into an owning table 2024-08-13 19:28:30 +02:00
downloadfromdcthread.h uemis: replace C-strings by std::string and std::string_view 2024-08-13 19:28:30 +02:00
equipment.cpp core: make round_to parameter of gas_mod() and gas_mnd() a depth_t 2024-12-17 13:58:27 +13:00
equipment.h core: add move constructor/copy assignment to weight and cylinder 2024-08-17 23:37:00 +12:00
errorhelper.cpp Avoid UTF8->UTF16->UTF8 roundtrip when logging on mobile 2024-12-01 16:33:33 +01:00
errorhelper.h core: use std::string in error_callback 2024-08-13 19:28:30 +02:00
event.cpp Refactoring: Improve event_loop. 2024-09-03 21:24:40 +02:00
event.h Refactoring: Improve event_loop. 2024-09-03 21:24:40 +02:00
eventtype.cpp core: fold event-related functions into event class 2024-08-13 19:28:30 +02:00
eventtype.h core: turn event-list of divecomputer into std::vector<> 2024-08-13 19:28:30 +02:00
exif.cpp
exif.h
extradata.h core: convert dive computer extra data to C++ 2024-08-13 19:28:30 +02:00
file.cpp Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
file.h Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
filterconstraint.cpp core: add cast_int<> function 2024-09-11 10:23:07 +02:00
filterconstraint.h core: remove filterconstraint C boilerplate code 2024-08-13 19:28:30 +02:00
filterpreset.cpp core: remove filterconstraint C boilerplate code 2024-08-13 19:28:30 +02:00
filterpreset.h core: remove filterconstraint C boilerplate code 2024-08-13 19:28:30 +02:00
filterpresettable.cpp filter: use std::move() to pass around std::string 2024-08-17 23:37:00 +12:00
filterpresettable.h core: remove filterconstraint C boilerplate code 2024-08-13 19:28:30 +02:00
format.cpp download: replace progress_bar_text by std::string 2024-08-13 19:28:30 +02:00
format.h download: replace progress_bar_text by std::string 2024-08-13 19:28:30 +02:00
fulltext.cpp core: turn C dive-table into an owning table 2024-08-13 19:28:30 +02:00
fulltext.h fulltext: replace plain pointer by std::unique_ptr<> 2024-08-13 19:28:30 +02:00
gas-model.cpp core: convert gas-model.c to C++ 2024-08-13 19:28:30 +02:00
gas.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
gas.h core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
gaspressures.cpp profile: make plotdata::depth depth_t 2024-12-17 13:58:27 +13:00
gaspressures.h core: remove __cplusplus ifdefs 2024-08-13 19:28:30 +02:00
gettext.h build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
gettextfromc.cpp build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
gettextfromc.h build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
git-access.cpp preferences: use std::string in struct preferences 2024-08-13 19:28:30 +02:00
git-access.h general: remove (void) function parameter declarations 2024-08-13 19:28:30 +02:00
globals.cpp
globals.h
imagedownloader.cpp media: load metadata and thumbnails of raw pictures using libraw 2024-09-21 11:03:53 +12:00
imagedownloader.h
import-cobalt.cpp import: use std::string for location in cobalt-import 2024-08-13 19:28:30 +02:00
import-csv.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
import-csv.h build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
import-divinglog.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
import-seac.cpp Cleanup: Fix Warnings in MacOS build. 2024-09-28 23:50:55 +12:00
import-shearwater.cpp core: turn struct dive string data into std::string 2024-08-13 19:28:30 +02:00
import-suunto.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
interpolate.h core: make interpolate() a template 2024-12-17 13:58:27 +13:00
ios.cpp core: move startup function declarations to subsurfacestartup.h 2024-08-13 19:28:30 +02:00
libdivecomputer.cpp Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
libdivecomputer.h Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
liquivision.cpp code cleanup: use std::move() to potentially void copies 2024-08-18 16:26:31 +02:00
load-git.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
macos.cpp core: move startup function declarations to subsurfacestartup.h 2024-08-13 19:28:30 +02:00
membuffer.cpp core: remove add_to_string() function 2024-08-13 19:28:30 +02:00
membuffer.h core: remove add_to_string() function 2024-08-13 19:28:30 +02:00
metadata.cpp Fix problems from rebase, clean up debian packaging definition. 2024-09-21 11:03:53 +12:00
metadata.h build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
metrics.cpp
metrics.h
namecmp.h core: remove __cplusplus ifdefs 2024-08-13 19:28:30 +02:00
ostctools.cpp Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
owning_table.h core: turn C dive-table into an owning table 2024-08-13 19:28:30 +02:00
parse-gpx.cpp cleanup: replace fprintf to stderr by report_info() 2024-04-23 07:47:11 +07:00
parse-gpx.h cleanup: more Coverity silencing 2024-01-17 14:23:19 -08:00
parse-xml.cpp Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
parse.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
parse.h Import: Add Parsing for Divesoft Freedom+ Format Files. 2024-11-19 08:47:00 +13:00
picture.cpp core: turn C dive-table into an owning table 2024-08-13 19:28:30 +02:00
picture.h core: turn picture-table into std::vector<> 2024-08-13 19:28:30 +02:00
planner.cpp planner: make argument to plan_add_segment() depth_t 2024-12-17 13:58:27 +13:00
planner.h planner: make argument to plan_add_segment() depth_t 2024-12-17 13:58:27 +13:00
plannernotes.cpp core: pass depth_t to depth_to_* functions 2024-12-17 13:58:27 +13:00
pref.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
pref.h Make the "Save dive data as subtitles" feature more configurable. 2024-10-27 01:37:04 +13:00
profile.cpp profile: small cleanup concerning depth_t 2024-12-17 13:58:27 +13:00
profile.h profile: make plotdata::depth depth_t 2024-12-17 13:58:27 +13:00
qt-ble.cpp general: remove (void) function parameter declarations 2024-08-13 19:28:30 +02:00
qt-ble.h general: remove (void) function parameter declarations 2024-08-13 19:28:30 +02:00
qt-gui.h
qt-init.cpp preferences: use std::string in struct preferences 2024-08-13 19:28:30 +02:00
qthelper.cpp Cleanup: Fix Warnings in MacOS build. 2024-09-28 23:50:55 +12:00
qthelper.h Cleanup: Fix Warnings in MacOS build. 2024-09-28 23:50:55 +12:00
qtserialbluetooth.cpp cleanup: remove typedef in qtserialbluetooth.cpp 2024-08-13 19:28:30 +02:00
range.h fix copy/paste of dive-site 2024-08-17 23:34:16 +12:00
sample.cpp core: simplify default initialization of struct sample 2024-08-13 19:28:30 +02:00
sample.h core: add CRTP base class to unit types 2024-09-11 10:23:07 +02:00
save-git.cpp core: move get_dive_location()/_country() to struct dive 2024-08-13 19:28:30 +02:00
save-html.cpp export-html: prevent invalid json 2024-11-05 19:17:12 +01:00
save-html.h core: turn C dive-table into an owning table 2024-08-13 19:28:30 +02:00
save-profiledata.cpp profile: make plotdata::depth depth_t 2024-12-17 13:58:27 +13:00
save-profiledata.h desktop: use std::string to format subtitles 2024-08-13 19:28:30 +02:00
save-xml.cpp core: move data file version functions into version.cpp/h 2024-08-13 19:28:30 +02:00
selection.cpp core: make find_next_visible_dive() member of dive_table 2024-08-13 19:28:30 +02:00
selection.h general: remove (void) function parameter declarations 2024-08-13 19:28:30 +02:00
serial_ftdi.cpp general: remove (void) function parameter declarations 2024-08-13 19:28:30 +02:00
serial_usb_android.cpp Cleanup: Remove 'context' Reference from Logging Defines. 2024-05-16 16:39:48 +02:00
serial_usb_android.h
sha1.cpp core: C++-ify SHA1 interface 2024-08-13 19:28:30 +02:00
sha1.h core: remove __cplusplus ifdefs 2024-08-13 19:28:30 +02:00
statistics.cpp core: introduce a few user-defined literals for unit types 2024-09-11 10:23:07 +02:00
statistics.h core: default initialize units-type objects to 0 2024-08-13 19:28:30 +02:00
string-format.cpp core: move gasname() to struct gasmix 2024-08-13 19:28:30 +02:00
string-format.h core: turn trip-table into our own sorted_owning_table 2024-08-13 19:28:30 +02:00
strtod.cpp build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
subsurface-float.h core: remove __cplusplus ifdefs 2024-08-13 19:28:30 +02:00
subsurface-string.cpp Use std::vector<string> instead of QStringList in main() 2024-04-23 07:47:11 +07:00
subsurface-string.h preferences: use std::string in struct preferences 2024-08-13 19:28:30 +02:00
subsurface-time.h undo: pass dive as unique_ptr to addDive() 2024-08-13 19:28:30 +02:00
subsurfacestartup.cpp Make the "Save dive data as subtitles" feature more configurable. 2024-10-27 01:37:04 +13:00
subsurfacestartup.h core: move startup function declarations to subsurfacestartup.h 2024-08-13 19:28:30 +02:00
subsurfacesysinfo.cpp build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
subsurfacesysinfo.h build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
tag.cpp core: remove structured_list.h 2024-08-13 19:28:30 +02:00
tag.h core: port tag-list to C++ 2024-08-13 19:28:30 +02:00
taxonomy.cpp core: move constructLocationTags from divesite.cpp to taxonomy.cpp 2024-08-13 19:28:30 +02:00
taxonomy.h preferences: use std::string in struct preferences 2024-08-13 19:28:30 +02:00
time.cpp core: move *_surface_pressure() functions into struct dive 2024-08-13 19:28:30 +02:00
trip.cpp core: move get_dive_location()/_country() to struct dive 2024-08-13 19:28:30 +02:00
trip.h core: move functions into trip-structure 2024-08-13 19:28:30 +02:00
triptable.cpp core: move functions into trip-structure 2024-08-13 19:28:30 +02:00
triptable.h core: move functions into trip-structure 2024-08-13 19:28:30 +02:00
uemis-downloader.cpp uemis downloader: use move instead of copy to return string 2024-08-17 23:37:00 +12:00
uemis.cpp core: pass depth_t to depth_to_* functions 2024-12-17 13:58:27 +13:00
uemis.h core: remove __cplusplus ifdefs 2024-08-13 19:28:30 +02:00
units.cpp core: turn M_OR_FT macro into a function 2024-12-17 13:58:27 +13:00
units.h profile: make plotdata::depth depth_t 2024-12-17 13:58:27 +13:00
unix.cpp core: move startup function declarations to subsurfacestartup.h 2024-08-13 19:28:30 +02:00
uploadDiveLogsDE.cpp core: turn C dive-table into an owning table 2024-08-13 19:28:30 +02:00
uploadDiveLogsDE.h core: remove __cplusplus ifdefs 2024-08-13 19:28:30 +02:00
uploadDiveShare.cpp core: remove membufferpp 2024-08-13 19:28:30 +02:00
uploadDiveShare.h core: remove __cplusplus ifdefs 2024-08-13 19:28:30 +02:00
version.cpp core: move data file version functions into version.cpp/h 2024-08-13 19:28:30 +02:00
version.h core: move data file version functions into version.cpp/h 2024-08-13 19:28:30 +02:00
videoframeextractor.cpp preferences: use std::string in struct preferences 2024-08-13 19:28:30 +02:00
videoframeextractor.h
webservice.h general: remove (void) function parameter declarations 2024-08-13 19:28:30 +02:00
windows.cpp core: move startup function declarations to subsurfacestartup.h 2024-08-13 19:28:30 +02:00
windowtitleupdate.cpp build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
windowtitleupdate.h
worldmap-options.h
worldmap-save.cpp core: move get_dive_location()/_country() to struct dive 2024-08-13 19:28:30 +02:00
worldmap-save.h build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
xmlparams.cpp build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
xmlparams.h build: remove extern "C" linkage 2024-08-13 19:28:30 +02:00
xmp_parser.cpp
xmp_parser.h