mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Removed duplicated method.
This patch removes a duplicated method: get_divenr and get_index_for_dive. The two are exactly the same ( if my c is not broken, but I may be broken since I'm working like crazy for almost 30h nonstop. ), so please take a good look before applying this one. [Dirk Hohndel: Tomaz took the slightly broken of the two implementations, so I switched that out for the correct one] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ad0aa8cc49
commit
314cf4c628
4 changed files with 14 additions and 23 deletions
9
dive.c
9
dive.c
|
@ -2038,15 +2038,6 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer
|
|||
return res;
|
||||
}
|
||||
|
||||
int get_index_for_dive(struct dive *dive) {
|
||||
int i;
|
||||
struct dive *d;
|
||||
for_each_dive(i, d)
|
||||
if (d == dive)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
struct dive *find_dive_including(timestamp_t when)
|
||||
{
|
||||
int i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue