This is a long commit, because it introduces a new abstraction:
a general std::vector<> of std::unique_ptrs<>.
Moreover, it replaces a number of pointers by C++ references,
when the callee does not suppoert null objects.
This simplifies memory management and makes ownership more
explicit. It is a proof-of-concept and a test-bed for
the other core data structrures.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Since the taxonomy is now a real C++ struct with constructor
and destructor, dive_site has to be converted to C++ as well.
A bit hairy for now, but will ultimately be distinctly simpler.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Only used in context of acquiring GPS locations with the mobile app, which
we no longer do.
Keep the DiveAndLocation structure around as that's needed by the
ApplyGpsFixes command.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This gets a list of dives with GPS fixes and
1) Adds new dive sites if the dive hasn't a dive site set
2) Edits the location of the dive site
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In the future we might want to use undo-commands for mobile as
well (even if not implementing undo).
Therefore, move the undo-command source from desktop-widgets
to their own commands top-level folder.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-14 21:02:07 +01:00
Renamed from desktop-widgets/command_divesite.h (Browse further)