core: move depth_to_* functions into struct dive

Seems logical in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-20 22:09:47 +02:00 committed by bstoeger
parent 3660241993
commit bf84d66df2
9 changed files with 83 additions and 85 deletions

View file

@ -144,7 +144,7 @@ void TabDiveInformation::updateProfile()
continue;
volumes.append(get_volume_string(gases[i], true));
if (duration[i]) {
sac.mliter = lrint(gases[i].mliter / (depth_to_atm(mean[i], currentDive) * duration[i] / 60));
sac.mliter = lrint(gases[i].mliter / (currentDive->depth_to_atm(mean[i]) * duration[i] / 60));
SACs.append(get_volume_string(sac, true).append(tr("/min")));
}
}