diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-25 09:05:47 +0100 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2019-03-27 13:58:15 +0100 |
commit | 40a3e562b01de2827fa6c2c5fd9d46631f91dc36 (patch) | |
tree | 194fa05c48b087220cabd206125cc82eaf439d0d /core/load-git.c | |
parent | 04593e8ec4bac2606dec54605c72a6a49cc83f9b (diff) | |
download | subsurface-40a3e562b01de2827fa6c2c5fd9d46631f91dc36.tar.gz |
Cleanup: provide printGPSCoords in C and C++ versions
printGPSCoords() returned a newly allocated C-style string. Most
callers simply made a QString out of it and freed the C-style string.
This is paradoxical, as printGPSCoords internally works with QStrings
and converts them to C-style on return.
Therefore, let printGPSCoords() return a QString and create a
printGPSCoordsC() wrapper for the two C-callers.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/load-git.c')
-rw-r--r-- | core/load-git.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/load-git.c b/core/load-git.c index 8417fc2e4..28b33f036 100644 --- a/core/load-git.c +++ b/core/load-git.c @@ -164,7 +164,7 @@ static void parse_dive_gps(char *line, struct membuffer *str, void *_dive) dive->dive_site = ds; } else { if (dive_site_has_gps_location(ds) && !same_location(&ds->location, &location)) { - char *coords = printGPSCoords(&location); + char *coords = printGPSCoordsC(&location); // we have a dive site that already has GPS coordinates ds->notes = add_to_string(ds->notes, translate("gettextFromC", "multiple GPS locations for this dive site; also %s\n"), coords); free(coords); |