mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
5d372cfda3
commit
f60343eebb
7 changed files with 29 additions and 58 deletions
12
core/dive.c
12
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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue