core: make event name an std::string

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-04 22:17:07 +02:00 committed by bstoeger
parent 408b31b6ce
commit b8c7b173c6
20 changed files with 149 additions and 152 deletions

View file

@ -397,11 +397,11 @@ static void save_one_event(struct membuffer *b, struct dive *dive, struct event
show_index(b, ev->type, "type=", "");
show_index(b, ev->flags, "flags=", "");
if (!strcmp(ev->name,"modechange"))
if (ev->name == "modechange")
show_utf8(b, " divemode=", divemode_text[ev->value], "");
else
show_index(b, ev->value, "value=", "");
show_utf8(b, " name=", ev->name, "");
show_utf8(b, " name=", ev->name.c_str(), "");
if (event_is_gaschange(ev)) {
struct gasmix mix = get_gasmix_from_event(dive, ev);
if (ev->gas.index >= 0)