diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-11 17:41:56 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-06 13:58:09 -0700 |
commit | 989d6a3f96b818e5eacc5a2ccb1cc82e6dd8354c (patch) | |
tree | 006daeb578ac4d3e68044ecfc36e7e12b1604ee8 /core/parse-xml.c | |
parent | 282041e228d4a60ff7108fbfd1fc23caffd59ba4 (diff) | |
download | subsurface-989d6a3f96b818e5eacc5a2ccb1cc82e6dd8354c.tar.gz |
media: use table instead of linked list for media
For consistency with equipment, use our table macros for pictures.
Generally tables (arrays) are preferred over linked lists, because
they allow random access.
This is mostly copy & paste of the equipment code.
Sadly, our table macros are quite messy and need some revamping.
Therefore, the resulting code is likewise somewhat messy.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/parse-xml.c')
-rw-r--r-- | core/parse-xml.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/parse-xml.c b/core/parse-xml.c index 164b17b83..4aad15bb5 100644 --- a/core/parse-xml.c +++ b/core/parse-xml.c @@ -1258,11 +1258,11 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf, str if (match_dc_data_fields(&dive->dc, name, buf, state)) return; - if (MATCH("filename.picture", utf8_string, &state->cur_picture->filename)) + if (MATCH("filename.picture", utf8_string, &state->cur_picture.filename)) return; - if (MATCH("offset.picture", offsettime, &state->cur_picture->offset)) + if (MATCH("offset.picture", offsettime, &state->cur_picture.offset)) return; - if (MATCH("gps.picture", gps_picture_location, state->cur_picture)) + if (MATCH("gps.picture", gps_picture_location, &state->cur_picture)) return; if (MATCH("hash.picture", utf8_string, &hash)) { /* Legacy -> ignore. */ |