mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make clone_* functions return a unique_ptr<>
Don't use plain pointers for owning pointers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0ef497c3c9
commit
1e09ec77d7
4 changed files with 22 additions and 31 deletions
|
@ -237,7 +237,7 @@ class DiveComputerBase : public DiveListBase {
|
|||
protected:
|
||||
// old_dive must be a dive known to the core.
|
||||
// new_dive must be new dive whose ownership is taken.
|
||||
DiveComputerBase(dive *old_dive, dive *new_dive, int dc_nr_before, int dc_nr_after);
|
||||
DiveComputerBase(dive *old_dive, std::unique_ptr<dive> new_dive, int dc_nr_before, int dc_nr_after);
|
||||
private:
|
||||
void undoit() override;
|
||||
void redoit() override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue