diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-09 18:58:33 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-10 15:57:39 -0800 |
commit | be9f9efb0eae6f09db4c61de7a5156b186dc2ad6 (patch) | |
tree | 39e661e97de294d2de514048aa625f58d08a4f88 /core/dive.c | |
parent | 09287809ebb76541a31af94e60856f731e3e9d37 (diff) | |
download | subsurface-be9f9efb0eae6f09db4c61de7a5156b186dc2ad6.tar.gz |
profile: pass dive to EventItem
Don't access the global displayed_dive variable in an effort
to make the profile reentrant.
Note that this still accesses the global dc_number variable,
which will likely have to be removed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/dive.c b/core/dive.c index 9167724d9..7e0a8a66d 100644 --- a/core/dive.c +++ b/core/dive.c @@ -3316,6 +3316,11 @@ struct divecomputer *get_dive_dc(struct dive *dive, int nr) return dc; } +const struct divecomputer *get_dive_dc_const(const struct dive *dive, int nr) +{ + return get_dive_dc((struct dive *)dive, nr); +} + struct dive *get_dive_by_uniq_id(int id) { int i; |