mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
ca391035f3
commit
65e9fecd80
3 changed files with 43 additions and 1 deletions
1
dive.c
1
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue