mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
cleanup: remove redundant get_dive_dc() calls
In ProfileScene::draw(), the divecomputer was calculated thrice. Remove the two redundant calls. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
dea58bd67c
commit
b1384b286f
1 changed files with 2 additions and 2 deletions
|
@ -439,7 +439,7 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
|
|||
* create_plot_info_new() automatically frees old plot data.
|
||||
*/
|
||||
if (!keepPlotInfo)
|
||||
create_plot_info_new(d, get_dive_dc_const(d, dc), &plotInfo, planner_ds);
|
||||
create_plot_info_new(d, currentdc, &plotInfo, planner_ds);
|
||||
|
||||
bool hasHeartBeat = plotInfo.maxhr;
|
||||
// For mobile we might want to turn of some features that are normally shown.
|
||||
|
@ -541,7 +541,7 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
|
|||
qDeleteAll(eventItems);
|
||||
eventItems.clear();
|
||||
struct event *event = currentdc->events;
|
||||
struct gasmix lastgasmix = get_gasmix_at_time(d, get_dive_dc_const(d, dc), duration_t{1});
|
||||
struct gasmix lastgasmix = get_gasmix_at_time(d, currentdc, duration_t{1});
|
||||
|
||||
while (event) {
|
||||
// if print mode is selected only draw headings, SP change, gas events or bookmark event
|
||||
|
|
Loading…
Reference in a new issue