diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-08-05 12:37:14 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-05 12:37:14 -0700 |
commit | 4583cd8e09944e61aa59baa58e74abee0af0d268 (patch) | |
tree | 0714993c8cf822c85b662f020ddd65ca4fc2d665 /dive.h | |
parent | 3adbff2320b90bbf27b1bedb540ec3d74fb30f9b (diff) | |
download | subsurface-4583cd8e09944e61aa59baa58e74abee0af0d268.tar.gz |
Picture handling: cleaning up the mess
We had pointers to data structures on the stack which we frequently
reallocated. These data structure contain basically a filename and an
offset. We then create a hash of the pointers to those datastructures with
the filename being the key. And then we passed those pointers around
through a Qt model(!!!) only in order to then later look up by filename
what the offset might be.
I am at a loss for words for the lunacy behind this design.
How about we just remember the offsets and pass the integers around?
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -311,7 +311,7 @@ struct picture { extern struct picture *alloc_picture(); extern void dive_create_picture(struct dive *d, char *filename, int shift_time); extern void dive_add_picture(struct dive *d, struct picture *newpic); -extern void dive_remove_picture(struct picture *pic); +extern void dive_remove_picture(char *filename); extern unsigned int dive_get_picture_count(struct dive *d); extern void picture_load_exif_data(struct picture *p, timestamp_t *timestamp); extern void dive_set_geodata_from_picture(struct dive *d, struct picture *pic); |