mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: use std::unique_ptr<> to make ownership transfer more clear
The decostate was generated in the main thread and passed down to a worker thread. To make that explicit, use an std::unique_ptr<> and std::move(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
d594cc72f0
commit
541abf7ae4
2 changed files with 8 additions and 10 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#include <QAbstractTableModel>
|
||||
#include <QDateTime>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "core/deco.h"
|
||||
|
@ -132,7 +133,7 @@ private:
|
|||
struct divedatapoint *cloneDiveplan(struct diveplan *plan_src, struct diveplan *plan_copy);
|
||||
void computeVariationsDone(QString text);
|
||||
void computeVariations(struct diveplan *diveplan, const struct deco_state *ds);
|
||||
void computeVariationsFreeDeco(struct diveplan *diveplan, struct deco_state *ds);
|
||||
void computeVariationsFreeDeco(struct diveplan *diveplan, std::unique_ptr<struct deco_state> ds);
|
||||
int analyzeVariations(struct decostop *min, struct decostop *mid, struct decostop *max, const char *unit);
|
||||
struct dive *d;
|
||||
int dcNr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue