diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-02-26 20:57:48 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-02-28 07:27:10 -0800 |
commit | 9c87c0dafd5d9946261787bcbb2e6311b5e5f444 (patch) | |
tree | 8e464682f5e98d1443ba31d4fe59aa3901518914 /core/dive.c | |
parent | 0893f87beb943ed8f5872aef18274f456b0c51ca (diff) | |
download | subsurface-9c87c0dafd5d9946261787bcbb2e6311b5e5f444.tar.gz |
Cleanup: make dive_set_geodata_from_picture() local to dive.c
The function dive_set_geodata_from_picture() is only used in
dive.c. Make it local to that translation unit.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/core/dive.c b/core/dive.c index ba3f7bbe6..0d100f37c 100644 --- a/core/dive.c +++ b/core/dive.c @@ -3958,6 +3958,19 @@ bool picture_check_valid_time(timestamp_t timestamp, int shift_time) return false; } +static void dive_set_geodata_from_picture(struct dive *dive, struct picture *picture) +{ + struct dive_site *ds = dive->dive_site; + if (!dive_site_has_gps_location(ds) && has_location(&picture->location)) { + if (ds) { + ds->location = picture->location; + } else { + dive->dive_site = create_dive_site_with_gps("", &picture->location, dive->when); + invalidate_dive_cache(dive); + } + } +} + void create_picture(const char *filename, int shift_time, bool match_all) { struct metadata metadata; @@ -4004,19 +4017,6 @@ unsigned int dive_get_picture_count(struct dive *dive) return i; } -void dive_set_geodata_from_picture(struct dive *dive, struct picture *picture) -{ - struct dive_site *ds = dive->dive_site; - if (!dive_site_has_gps_location(ds) && has_location(&picture->location)) { - if (ds) { - ds->location = picture->location; - } else { - dive->dive_site = create_dive_site_with_gps("", &picture->location, dive->when); - invalidate_dive_cache(dive); - } - } -} - void picture_free(struct picture *picture) { if (!picture) |