mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Migrate code to for_each_dive and for_each_dc
[Dirk Hohndel: this overlapped with my commit 09e7c61fee
("Consistently
use for_each_dive (and use it correctly)") so I took the
pieces that I had missed]
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
91c20357f5
commit
05d9cc409c
6 changed files with 9 additions and 21 deletions
|
@ -392,12 +392,8 @@ void save_one_dive(struct membuffer *b, struct dive *dive)
|
|||
save_weightsystem_info(b, dive);
|
||||
save_dive_temperature(b, dive);
|
||||
/* Save the dive computer data */
|
||||
dc = &dive->dc;
|
||||
do {
|
||||
for_each_dc(dive, dc)
|
||||
save_dc(b, dive, dc);
|
||||
dc = dc->next;
|
||||
} while (dc);
|
||||
|
||||
put_format(b, "</dive>\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue