mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: add constructor/destructor pairs to dive and divecomputer
This allows us to use non-C member variables. Convert a number of pointers to unique_ptr<>s. Code in uemis-downloader.cpp had to be refactored, because it mixed owning and non-owning pointers. Mad. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
bfb54aa581
commit
cc39f709ce
35 changed files with 289 additions and 308 deletions
|
|
@ -15,9 +15,9 @@ namespace Command {
|
|||
|
||||
// This helper structure describes a dive that we want to add.
|
||||
struct DiveToAdd {
|
||||
OwningDivePtr dive; // Dive to add
|
||||
dive_trip *trip; // Trip the dive belongs to, may be null
|
||||
dive_site *site; // Site the dive is associated with, may be null
|
||||
std::unique_ptr<struct dive> dive; // Dive to add
|
||||
dive_trip *trip; // Trip the dive belongs to, may be null
|
||||
dive_site *site; // Site the dive is associated with, may be null
|
||||
};
|
||||
|
||||
// Multiple trips, dives and dive sites that have to be added for a command
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue