summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2017-10-02 17:49:49 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-02 09:52:50 -0700
commite1bd006cd624ab203f75b818d5b8bc534fe36d87 (patch)
tree30a0d338f14070b4ee7e27b72fee694e109d075d
parentdd1c48de66478a1a98281002ac535da96de92902 (diff)
downloadsubsurface-e1bd006cd624ab203f75b818d5b8bc534fe36d87.tar.gz
[Divesite] request dive country
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--core/dive.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/dive.h b/core/dive.h
index 66760dd22..a638cfd0c 100644
--- a/core/dive.h
+++ b/core/dive.h
@@ -570,6 +570,14 @@ static inline struct dive_site *get_dive_site_for_dive(struct dive *dive)
return NULL;
}
+static inline char *get_dive_country(struct dive *dive)
+{
+ struct dive_site *ds = get_dive_site_by_uuid(dive->dive_site_uuid);
+ if (ds && ds->country)
+ return ds->country;
+ return NULL;
+}
+
static inline char *get_dive_location(struct dive *dive)
{
struct dive_site *ds = get_dive_site_by_uuid(dive->dive_site_uuid);