mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
gases: fill result of isobaric_counterdiffusion() on early return
If prefs.show_icd is false, this function does nothing, but the output parameter is checked by the calling function DiveEventItem::setupToolTipString(). Let's reset the strucvture to 0. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
4bab38b8df
commit
13b894a756
1 changed files with 3 additions and 1 deletions
|
@ -15,8 +15,10 @@
|
|||
*/
|
||||
bool isobaric_counterdiffusion(struct gasmix oldgasmix, struct gasmix newgasmix, struct icd_data *results)
|
||||
{
|
||||
if (!prefs.show_icd)
|
||||
if (!prefs.show_icd) {
|
||||
results->dN2 = results->dHe = 0;
|
||||
return false;
|
||||
}
|
||||
results->dN2 = get_n2(newgasmix) - get_n2(oldgasmix);
|
||||
results->dHe = get_he(newgasmix) - get_he(oldgasmix);
|
||||
return get_he(oldgasmix) > 0 && results->dN2 > 0 && results->dHe < 0 && get_he(oldgasmix) && results->dN2 > 0 && 5 * results->dN2 > -results->dHe;
|
||||
|
|
Loading…
Reference in a new issue