subsurface/commands
Berthold Stoeger f120fecccb core: use std::vector<> to store divecomputer samples
This is a hairy one, because the sample code is rather tricky.

There was a pattern of looping through pairs of adjacent samples,
for interpolation purposes. Add an range adapter to generalize
such loops.

Removes the finish_sample() function: The code would call
prepare_sample() to start parsing of samples and then
finish_sample() to actuall add it. I.e. a kind of commit().

Since, with one exception, all users of prepare_sample()
called finish_sample() in all code paths, we might just add
the sample in the first place. The exception was sample_end()
in parse.cpp. This brings a small change: samples are now
added, even if they could only be parsed partially. I doubt
that this makes any difference, since it will only happen
for broken divelogs anyway.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2024-08-13 19:28:30 +02:00
..
CMakeLists.txt undo: add device related undo commands 2020-10-25 13:59:04 -07:00
command.cpp core: replace divesite_table_t by a vector of std::unique_ptr<>s 2024-08-13 19:28:30 +02:00
command.h core: replace divesite_table_t by a vector of std::unique_ptr<>s 2024-08-13 19:28:30 +02:00
command_base.cpp core: introduce divelog structure 2023-04-14 21:20:23 +02:00
command_base.h core: make owning pointers a top-level features 2023-04-16 20:23:59 +02:00
command_device.cpp core: turn string data in struct divecomputer into std::string 2024-08-13 19:28:30 +02:00
command_device.h undo/device: adjust device management infrastructure 2021-08-18 13:22:02 -07:00
command_divelist.cpp core: add constructor/destructor pairs to dive and divecomputer 2024-08-13 19:28:30 +02:00
command_divelist.h core: add constructor/destructor pairs to dive and divecomputer 2024-08-13 19:28:30 +02:00
command_divesite.cpp core: move get_same_dive_site() into dive_site_table class 2024-08-13 19:28:30 +02:00
command_divesite.h core: replace divesite_table_t by a vector of std::unique_ptr<>s 2024-08-13 19:28:30 +02:00
command_edit.cpp core: use std::vector<> to store divecomputer samples 2024-08-13 19:28:30 +02:00
command_edit.h core: add constructor/destructor pairs to dive and divecomputer 2024-08-13 19:28:30 +02:00
command_edit_trip.cpp selection: trickle down trip selection 2023-04-16 20:23:59 +02:00
command_edit_trip.h selection: trickle down trip selection 2023-04-16 20:23:59 +02:00
command_event.cpp core: remove get_event_mutable() 2024-08-13 19:28:30 +02:00
command_event.h core: default initialize units-type objects to 0 2024-08-13 19:28:30 +02:00
command_filter.cpp core: port filterpreset.cpp to std::string 2024-03-10 11:01:42 +13:00
command_filter.h core: port filterpreset.cpp to std::string 2024-03-10 11:01:42 +13:00
command_pictures.cpp cleanup: pass location_t as value to divesite functions 2024-08-13 19:28:30 +02:00
command_pictures.h core: convert taxonomy.c to C++ 2024-08-13 19:28:30 +02:00