From 461c610a3d6b8f6704ecd30249291b32350f399f Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 13 Aug 2019 21:41:46 +0200 Subject: Mobile: remove DiveObjectHelper to bool casts These were temporary functions as long as DiveObjectHelpers were used to access dives. All users now access the core directly and therefore don't have to test DiveObjectHelpers for validity. Signed-off-by: Berthold Stoeger --- core/subsurface-qt/DiveObjectHelper.cpp | 10 ---------- core/subsurface-qt/DiveObjectHelper.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index de0c8bba9..5b4fb72b3 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -67,16 +67,6 @@ 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; diff --git a/core/subsurface-qt/DiveObjectHelper.h b/core/subsurface-qt/DiveObjectHelper.h index c7401d05a..63ab2ff04 100644 --- a/core/subsurface-qt/DiveObjectHelper.h +++ b/core/subsurface-qt/DiveObjectHelper.h @@ -50,8 +50,6 @@ class DiveObjectHelper { public: DiveObjectHelper(); // This is only to be used by Qt's metatype system! DiveObjectHelper(struct dive *dive); - operator bool() const; // Returns false if this is an invalid default-generated object - bool operator!() const; // Returns true if this is an invalid default-generated object int number() const; int id() const; int rating() const; -- cgit v1.2.3-70-g09d2