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

@ -394,7 +394,7 @@ static void save_one_event(struct membuffer *b, struct dive *dive, const struct
else
show_index(b, ev.value, "value=", "");
show_utf8(b, " name=", ev.name.c_str(), "");
if (event_is_gaschange(ev)) {
if (ev.is_gaschange()) {
struct gasmix mix = get_gasmix_from_event(dive, ev);
if (ev.gas.index >= 0)
show_integer(b, ev.gas.index, "cylinder=", "");