subsurface/commands
Berthold Stoeger d242198c99 divelog: turn owning-pointers into unique_ptr<>s
Since everything is C++ now, we can use unique_ptr<>s. This makes
the code significantly shorter, because we can now use the default
move constructor and assignment operators.

This has a semantic change when std::move()-ing the divelog:
now not the contents of the tables are moved, but the pointers.
That is, the moved-from object now has no more tables and
must not be used anymore. This made it necessary to replace
std::move()s by std::swap()s. In that regard, the old code was
in principle broken: it used moved-from objects, which may work
but usually doesn't.

This commit adds a myriad of .get() function calls where the code
expects a C-style pointer. The plan is to remove virtually all of
them, when we move free-standing functions into the class it acts
on. Or, replace C-style pointers by references where we don't support
NULL.

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 divelog: turn owning-pointers into unique_ptr<>s 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 divelog: turn owning-pointers into unique_ptr<>s 2024-08-13 19:28:30 +02:00
command_divelist.h core: convert taxonomy.c to C++ 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 divelog: turn owning-pointers into unique_ptr<>s 2024-08-13 19:28:30 +02:00
command_edit.h core: convert taxonomy.c to C++ 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