Berthold Stoeger
2c6b1a99af
Cleanup: simplify dive_getUniqID()
...
dive_getUniqID() is used to create unique dive ids, which are
stable during application lifetime. It was passed a dive, checked
that the id was not set (if it was that it is know to the application)
and set a new id (in contradiction to its name!) if it hadn't any.
There were three callers:
alloc_dive(): called the function on a zeroed dive struct.
fixup_dive(): called the function only if the dive had a 0 id.
MainWindow::setupForAddAndPlan(): called the function on a zeroed dive
struct.
Thus, in all three callers the id is guaranteed to be zero and
the whole keeping-track-of-ids logic is moot. Remove the logic,
don't pass a dive struct to dive_getUniqID() and move the function
to the C-backend.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-17 15:20:52 -07:00
..
2015-10-30 10:36:49 -07:00
2018-06-04 08:50:10 -07:00
2018-07-15 09:38:12 -07:00
2018-05-21 12:48:04 -07:00
2018-07-15 09:38:12 -07:00
2017-12-30 08:23:22 -08:00
2017-04-29 13:32:55 -07:00
2017-11-30 23:14:46 -08:00
2018-02-26 08:52:34 +01:00
2017-12-23 11:17:47 +01:00
2017-11-16 14:26:51 +01:00
2018-07-04 02:27:36 +08:00
2018-07-13 09:44:33 -07:00
2017-06-21 18:43:15 -07:00
2018-04-27 21:33:47 +03:00
2017-11-30 23:14:46 -08:00
2018-06-17 06:53:13 +09:00
2018-06-17 06:53:13 +09:00
2017-11-30 23:14:46 -08:00
2018-07-15 09:38:12 -07:00
2018-07-04 02:27:36 +08:00
2018-05-21 12:48:04 -07:00
2018-06-04 08:50:10 -07:00
2017-11-30 23:14:46 -08:00
2018-05-21 12:48:04 -07:00
2017-04-29 13:32:55 -07:00
2017-11-30 23:14:46 -08:00
2017-12-18 12:07:10 -08:00
2017-12-18 12:07:10 -08:00
2018-07-13 11:26:28 -07:00
2018-05-14 10:13:39 -07:00
2018-03-02 08:38:22 -08:00
2018-06-16 04:02:47 -07:00
2017-05-27 11:07:20 -07:00
2015-10-30 10:36:49 -07:00
2018-06-04 08:50:10 -07:00
2017-11-11 21:01:42 +01:00
2017-11-30 23:14:46 -08:00
2017-11-30 23:14:46 -08:00
2018-07-15 09:38:12 -07:00
2018-07-04 02:27:36 +08:00
2018-07-15 09:38:12 -07:00
2018-01-10 16:45:42 +01:00
2018-01-10 16:45:42 +01:00
2017-04-29 13:32:55 -07:00
2017-04-29 13:32:55 -07:00
2017-12-30 08:15:11 -08:00
2018-06-26 08:06:07 +02:00
2017-11-27 22:59:22 +01:00
2018-01-27 12:29:00 -08:00
2018-07-17 15:20:52 -07:00
2018-07-04 02:27:36 +08:00
2018-07-15 09:38:12 -07:00
2018-07-12 08:08:00 -07:00
2017-11-09 12:40:25 -08:00
2018-06-24 20:31:14 +02:00
2018-05-14 23:47:00 +03:00
2018-01-31 14:47:26 +01:00
2018-01-31 14:47:26 +01:00
2017-02-24 01:06:09 -08:00
2017-11-13 11:53:55 +01:00
2018-05-21 12:48:04 -07:00
2017-04-29 13:32:55 -07:00
2018-06-04 08:50:10 -07:00
2017-04-29 13:32:55 -07:00
2018-06-04 08:50:10 -07:00
2017-12-29 09:14:20 -08:00
2015-10-30 10:36:49 -07:00
2015-10-30 10:36:49 -07:00
2015-10-30 10:36:49 -07:00
2017-11-30 23:14:46 -08:00
2017-11-30 23:14:46 -08:00
2017-11-30 23:14:46 -08:00
2018-07-15 09:38:12 -07:00
2017-11-30 23:14:46 -08:00
2018-07-04 05:33:31 +08:00
2017-12-26 13:08:49 -08:00
2018-05-21 12:48:04 -07:00
2017-04-29 13:32:55 -07:00
2018-07-04 05:33:31 +08:00
2017-11-26 23:17:23 +01:00
2017-11-30 23:14:46 -08:00
2017-04-29 13:32:55 -07:00
2015-10-30 10:36:49 -07:00
2017-11-17 09:19:03 +01:00
2017-04-29 13:32:55 -07:00
2018-05-23 13:29:37 +03:00
2017-04-29 13:32:55 -07:00
2017-03-12 09:19:03 -07:00
2018-06-04 08:50:10 -07:00
2018-07-04 05:33:31 +08:00
2018-05-14 10:13:39 -07:00
2018-05-14 10:13:39 -07:00
2018-06-04 08:50:10 -07:00
2017-04-29 13:32:55 -07:00
2018-07-15 09:38:12 -07:00
2018-06-04 08:50:10 -07:00
2018-05-31 21:29:29 +03:00
2018-06-04 08:50:10 -07:00
2017-04-29 13:32:55 -07:00
2017-03-06 06:40:00 -08:00
2017-11-30 23:14:46 -08:00