mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Use enum name instead of its int value.
SAMPLE_EVENT_GASCHANGE2 is the libdivecomputer name of the event. Compare with that instead of its int value. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
96f707abfe
commit
08df5e7e87
1 changed files with 3 additions and 3 deletions
|
@ -602,10 +602,10 @@ int get_cylinder_index(struct dive *dive, struct event *ev)
|
|||
distance = delta_o2 * delta_o2;
|
||||
|
||||
/* Check the event type to figure out if we should care about the he part.
|
||||
* 11 is SAMPLE_EVENT_GASCHANGE, aka without he
|
||||
* 25 is SAMPLE_EVENT_GASCHANGE2, aka with he
|
||||
* SAMPLE_EVENT_GASCHANGE, aka without he
|
||||
* SAMPLE_EVENT_GASCHANGE2, aka with he
|
||||
*/
|
||||
if (ev->type == 25)
|
||||
if (ev->type == SAMPLE_EVENT_GASCHANGE2)
|
||||
distance += delta_he * delta_he;
|
||||
if (distance >= score)
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue