diff options
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index c19c03eb4..cb6cf6dd1 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -67,6 +67,16 @@ DiveObjectHelper::DiveObjectHelper(struct dive *d) : { } +DiveObjectHelper::operator bool() const +{ + return !!m_dive; +} + +bool DiveObjectHelper::operator!() const +{ + return !m_dive; +} + int DiveObjectHelper::number() const { return m_dive->number; |