From 05d9cc409c7ddffcd981c0dafaf67ba6935cc0ba Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Wed, 14 May 2014 00:32:45 +0200 Subject: Migrate code to for_each_dive and for_each_dc [Dirk Hohndel: this overlapped with my commit 09e7c61feeea ("Consistently use for_each_dive (and use it correctly)") so I took the pieces that I had missed] Signed-off-by: Anton Lundin Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index c1d6e8d4d..07ce1f001 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -887,8 +887,7 @@ void DiveListView::loadImages() for_each_dive(j, dive) { if (!dive->selected) continue; - dc = &(dive->dc); - while (dc) { + for_each_dc(dive, dc) { when = dc->when ? dc->when : dive->when; duration_s = dc->duration.seconds ? dc->duration.seconds : dive->duration.seconds; if (when - 3600 < imagetime && when + duration_s + 3600 > imagetime) { @@ -909,7 +908,6 @@ void DiveListView::loadImages() MainWindow::instance()->refreshDisplay(); MainWindow::instance()->graphics()->replot(); } - dc = dc->next; } } } -- cgit v1.2.3-70-g09d2