diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-10-11 21:02:55 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-10-11 16:25:02 -0700 |
commit | ad57871a2cbb03b0880d33184466e052a20dbd1d (patch) | |
tree | 45260621335dd58acbb32425afb8f5a76fdaf09f /core/divesitehelpers.h | |
parent | 04ad9c885da672b476d3abf4bc33ba172868eb61 (diff) | |
download | subsurface-ad57871a2cbb03b0880d33184466e052a20dbd1d.tar.gz |
Geo lookup: don't pass arguments / result via global object
The reverseGeoLookup() fetches dive-site data via GPS coordinates.
The coordinates and the result were passed via the global
"displayed_dive_site" object. To make data-flow more clear,
pass data as in and out parameters instead.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/divesitehelpers.h')
-rw-r--r-- | core/divesitehelpers.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/divesitehelpers.h b/core/divesitehelpers.h index eabb156f4..a894da60d 100644 --- a/core/divesitehelpers.h +++ b/core/divesitehelpers.h @@ -2,6 +2,11 @@ #ifndef DIVESITEHELPERS_H #define DIVESITEHELPERS_H -void reverseGeoLookup(); +#include "taxonomy.h" +#include "units.h" + +// Perform a reverse geo-lookup and put data in the provided taxonomy field. +// Original data with the exception of OCEAN will be overwritten. +void reverseGeoLookup(degrees_t latitude, degrees_t longitude, taxonomy_data *taxonomy); #endif // DIVESITEHELPERS_H |