some similar functions
Tomaz Canabrava
tcanabrava at kde.org
Sat Nov 16 13:16:47 UTC 2013
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;
}
int get_divenr(struct dive *dive)
{
int divenr = -1;
while (++divenr < dive_table.nr && get_dive(divenr) != dive)
;
return divenr;
}
Safe to remove one of them both?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hohndel.org/pipermail/subsurface/attachments/20131116/a1734791/attachment.html>
More information about the subsurface
mailing list