diff options
-rw-r--r-- | core/gpslocation.cpp | 13 | ||||
-rw-r--r-- | core/gpslocation.h | 1 |
2 files changed, 10 insertions, 4 deletions
diff --git a/core/gpslocation.cpp b/core/gpslocation.cpp index dccfeb3b2..3f4fb887d 100644 --- a/core/gpslocation.cpp +++ b/core/gpslocation.cpp @@ -218,15 +218,14 @@ int GpsLocation::getGpsNum() const last = _mark; \ } -int GpsLocation::applyLocations() +std::vector<DiveAndLocation> GpsLocation::getLocations() { int i; int last = 0; int cnt = m_trackers.count(); - if (cnt == 0) - return false; - std::vector<DiveAndLocation> fixes; + if (cnt == 0) + return fixes; // create a table with the GPS information QList<struct gpsTracker> gpsTable = m_trackers.values(); @@ -308,6 +307,12 @@ int GpsLocation::applyLocations() } } + return fixes; +} + +int GpsLocation::applyLocations() +{ + std::vector<DiveAndLocation> fixes = getLocations(); for (DiveAndLocation &dl: fixes) { struct dive_site *ds = dl.d->dive_site; if (!ds) { diff --git a/core/gpslocation.h b/core/gpslocation.h index 88fdb813c..2e8f92b26 100644 --- a/core/gpslocation.h +++ b/core/gpslocation.h @@ -33,6 +33,7 @@ public: ~GpsLocation(); static GpsLocation *instance(); static bool hasInstance(); + std::vector<DiveAndLocation> getLocations(); int applyLocations(); int getGpsNum() const; bool hasLocationsSource(); |