summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar jan Iversen <jan@casacondor.com>2019-11-28 16:04:00 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-12-05 10:11:42 -0800
commited1264ce491dc6c9f32d87ef854363a98a0a2f35 (patch)
treeeeee678292a71485ca263abc3b0cbcb68f1a0179 /core
parent599984d44a39f6ec69c5813acf2b4eba1b09c519 (diff)
downloadsubsurface-ed1264ce491dc6c9f32d87ef854363a98a0a2f35.tar.gz
core: add dive_site export for mobile in Exportfuncs
DiveFilter is not available in Mobile, so another solution is needed. Use "for_each_dive_site" to loop over dive sites instead. Signed-off-by: Jan Iversen <jan@casacondor.com>
Diffstat (limited to 'core')
-rw-r--r--core/exportfuncs.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/exportfuncs.cpp b/core/exportfuncs.cpp
index e05cdcb33..839c0bf1d 100644
--- a/core/exportfuncs.cpp
+++ b/core/exportfuncs.cpp
@@ -8,6 +8,7 @@
#include "core/file.h"
#include "core/errorhelper.h"
#include "core/divefilter.h"
+#include "core/divesite.h"
#include "exportfuncs.h"
@@ -300,6 +301,12 @@ std::vector<const dive_site *> exportFuncs::getDiveSitesToExport(bool selectedOn
continue;
res.push_back(ds);
}
+#else
+ /* walk the dive site list */
+ int i;
+ const struct dive_site *ds;
+ for_each_dive_site (i, ds, &dive_site_table)
+ res.push_back(get_dive_site(i, &dive_site_table));
#endif
return res;
}