mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
planner: use value semantics for computeVariations()
When computing the variations in a background thread, the code has to work on a copy of the dive plan and the deco state. Instead of passing a copy via a unique_ptr<>, simply use value semantics when calling computeVariations(). This does an unnecessary copy of the deco state, when computeVariations is not run in the background, but so what. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
9f55f167b2
commit
4f7d567571
2 changed files with 16 additions and 40 deletions
|
|
@ -131,8 +131,7 @@ private:
|
|||
void createTemporaryPlan();
|
||||
struct diveplan diveplan;
|
||||
void computeVariationsDone(QString text);
|
||||
void computeVariations(std::unique_ptr<struct diveplan> plan, const struct deco_state *ds);
|
||||
void computeVariationsFreeDeco(std::unique_ptr<struct diveplan> plan, std::unique_ptr<struct deco_state> ds);
|
||||
void computeVariations(struct diveplan plan, struct deco_state ds); // Note: works on copies of plan and ds
|
||||
int analyzeVariations(const std::vector<decostop> &min, const std::vector<decostop> &mid, const std::vector<decostop> &max, const char *unit);
|
||||
struct dive *d;
|
||||
int dcNr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue