summaryrefslogtreecommitdiffstats
path: root/core/dive.c
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-03-07 16:37:31 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-05-13 13:52:35 -0700
commitf60343eebbf6a31a4643dde9f4454f6ce84f61d3 (patch)
tree160871fa52c6973c1d9e1459df6c98d6b5db19a4 /core/dive.c
parent5d372cfda3770207ce95e6d64ac2ee141681421b (diff)
downloadsubsurface-f60343eebbf6a31a4643dde9f4454f6ce84f61d3.tar.gz
Dive pictures: replace picture struct by QString
In imagedownloader.cpp the only thing we need from the picture struct is the filename. Therefore, use QStrings instead of the picture struct. This simplifies memory management. Remove the clone_picture() function, which is not needed anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
-rw-r--r--core/dive.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/core/dive.c b/core/dive.c
index 3d7c0f486..00c232215 100644
--- a/core/dive.c
+++ b/core/dive.c
@@ -3843,18 +3843,6 @@ void picture_free(struct picture *picture)
free(picture);
}
-// When handling pictures in different threads, we need to copy them so we don't
-// run into problems when the main thread frees the picture.
-
-struct picture *clone_picture(struct picture *src)
-{
- struct picture *dst;
-
- dst = alloc_picture();
- copy_pl(src, dst);
- return dst;
-}
-
// Return true if picture was found and deleted
bool dive_remove_picture(struct dive *d, const char *filename)
{