From c7f813895866981ef97c99ed52d2d2a80dc13178 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 18 Aug 2015 09:38:21 +0200 Subject: Make transactions testable as boolean --- common/storage.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'common') diff --git a/common/storage.h b/common/storage.h index da225ef..a7241a7 100644 --- a/common/storage.h +++ b/common/storage.h @@ -94,6 +94,10 @@ public: other.d = nullptr; return *this; } + + operator bool() const { + return (d != nullptr); + } private: Transaction(Transaction& other); Transaction& operator=(Transaction& other); -- cgit v1.2.3