core: remove get_event_mutable()

We can now return mutable/imutable depending on const-ness of
the parameter, owing to parameter overloading.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-04 22:26:30 +02:00 committed by bstoeger
parent b8c7b173c6
commit 5960fb7340
4 changed files with 5 additions and 6 deletions

View file

@ -221,7 +221,7 @@ int get_cylinder_index(const struct dive *dive, const struct event *ev)
return best < 0 ? 0 : best;
}
struct event *get_next_event_mutable(struct event *event, const std::string &name)
struct event *get_next_event(struct event *event, const std::string &name)
{
if (name.empty())
return NULL;
@ -235,7 +235,7 @@ struct event *get_next_event_mutable(struct event *event, const std::string &nam
const struct event *get_next_event(const struct event *event, const std::string &name)
{
return get_next_event_mutable((struct event *)event, name);
return get_next_event((struct event *)event, name);
}
static int count_events(const struct divecomputer *dc)