mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Consistently use for_each_dive (and use it correctly)
The way the macro is written there is no need to test the dive against NULL before dereferencing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b303f217a9
commit
09e7c61fee
5 changed files with 17 additions and 25 deletions
|
@ -706,8 +706,7 @@ void DiveListView::deleteDive()
|
|||
// so instead of using the for_each_dive macro I'm using an explicit for loop
|
||||
// to make this easier to understand
|
||||
int lastDiveNr = -1;
|
||||
for (i = 0; i < dive_table.nr; i++) {
|
||||
d = get_dive(i);
|
||||
for_each_dive (i, d) {
|
||||
if (!d->selected)
|
||||
continue;
|
||||
delete_single_dive(i);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue