mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
c27314d603
commit
e237f29fb2
12 changed files with 28 additions and 29 deletions
|
|
@ -48,6 +48,10 @@ struct event {
|
|||
~event();
|
||||
|
||||
bool operator==(const event &b2) const;
|
||||
|
||||
bool is_gaschange() const;
|
||||
bool is_divemodechange() const;
|
||||
event_severity get_severity() const;
|
||||
};
|
||||
|
||||
class event_loop
|
||||
|
|
@ -83,10 +87,6 @@ public:
|
|||
divemode_t next(int time);
|
||||
};
|
||||
|
||||
extern bool event_is_gaschange(const struct event &ev);
|
||||
extern bool event_is_divemodechange(const struct event &ev);
|
||||
extern enum event_severity get_event_severity(const struct event &ev);
|
||||
|
||||
extern const struct event *get_first_event(const struct divecomputer &dc, const std::string &name);
|
||||
extern struct event *get_first_event(struct divecomputer &dc, const std::string &name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue