core: turn picture-table into std::vector<>

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-30 15:00:28 +02:00 committed by bstoeger
parent 3cb04d230b
commit 9e3e0a5a05
29 changed files with 170 additions and 316 deletions

View file

@ -280,14 +280,14 @@ void export_depths(const char *filename, bool selected_only)
if (selected_only && !dive->selected)
continue;
FOR_EACH_PICTURE (dive) {
for (auto &picture: dive->pictures) {
depth_t depth;
for (auto &s: dive->dcs[0].samples) {
if ((int32_t)s.time.seconds > picture->offset.seconds)
if ((int32_t)s.time.seconds > picture.offset.seconds)
break;
depth = s.depth;
}
put_format(&buf, "%s\t%.1f", picture->filename, get_depth_units(depth.mm, NULL, &unit));
put_format(&buf, "%s\t%.1f", picture.filename.c_str(), get_depth_units(depth.mm, NULL, &unit));
put_format(&buf, "%s\n", unit);
}
}