diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-01-07 09:30:01 +0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-01-07 12:02:42 +0800 |
commit | 65e9fecd806810d9462e775ffeba3badf66bd948 (patch) | |
tree | 67b967685fb50027433aaaa517fb1ffbaa92685a /dive.c | |
parent | ca391035f303e7d4382eb8e50cca8619e354c20e (diff) | |
download | subsurface-65e9fecd806810d9462e775ffeba3badf66bd948.tar.gz |
Add a unique id to every dive
This id is just held in memory. It's not supposed to be used for anything
but having a unique handle that represents a dive. Whenever you need to
remember a dive across an operation that might change the dive_table, this
is what you should hold on to, not a dive number, a dive pointer, or
anything like that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r-- | dive.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -892,6 +892,7 @@ struct dive *fixup_dive(struct dive *dive) weightsystem_t *ws = dive->weightsystem + i; add_weightsystem_description(ws); } + dive->id = getUniqID(dive); return dive; } |