core: fold event-related functions into event class

Not strictly necessary, but more idiomatic C++ and less
polution of the global namespace. This one is so trivial
that there seems to be no reason not to do it.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-25 20:12:10 +02:00 committed by bstoeger
parent c27314d603
commit e237f29fb2
12 changed files with 28 additions and 29 deletions

View file

@ -559,7 +559,7 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
if (event.name.empty() ||
!(event.name == "heading" ||
(event.name == "SP change" && event.time.seconds == 0) ||
event_is_gaschange(event) ||
event.is_gaschange() ||
event.type == SAMPLE_EVENT_BOOKMARK))
continue;
}
@ -570,7 +570,7 @@ void ProfileScene::plotDive(const struct dive *dIn, int dcIn, DivePlannerPointsM
addItem(item);
eventItems.push_back(item);
}
if (event_is_gaschange(event))
if (event.is_gaschange())
lastgasmix = get_gasmix_from_event(d, event);
}