mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Core: add unique id to trip
To make it easier to pass around trips through QML, give each trip a unique id. The id is generated in alloc_trip() and uses the same function to generate unique dive ids. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
356293da7d
commit
067a481b78
2 changed files with 4 additions and 1 deletions
|
|
@ -122,7 +122,9 @@ void remove_dive_from_trip(struct dive *dive, struct trip_table *trip_table_arg)
|
|||
|
||||
dive_trip_t *alloc_trip(void)
|
||||
{
|
||||
return calloc(1, sizeof(dive_trip_t));
|
||||
dive_trip_t *res = calloc(1, sizeof(dive_trip_t));
|
||||
res->id = dive_getUniqID();
|
||||
return res;
|
||||
}
|
||||
|
||||
/* insert the trip into the trip table */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue