summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-07 09:30:01 +0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-07 12:02:42 +0800
commit65e9fecd806810d9462e775ffeba3badf66bd948 (patch)
tree67b967685fb50027433aaaa517fb1ffbaa92685a /dive.c
parentca391035f303e7d4382eb8e50cca8619e354c20e (diff)
downloadsubsurface-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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index 540f40eb5..a902bca68 100644
--- a/dive.c
+++ b/dive.c
@@ -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;
}