diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-18 09:38:21 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-08-18 18:48:06 +0200 |
commit | c7f813895866981ef97c99ed52d2d2a80dc13178 (patch) | |
tree | 18f7b41e631ac0c277f5bb125aed78c3cc9cd04a /common/storage.h | |
parent | 9f3a6ff5d27e4983ee626231e43210d2bbb95dd6 (diff) | |
download | sink-c7f813895866981ef97c99ed52d2d2a80dc13178.tar.gz sink-c7f813895866981ef97c99ed52d2d2a80dc13178.zip |
Make transactions testable as boolean
Diffstat (limited to 'common/storage.h')
-rw-r--r-- | common/storage.h | 4 |
1 files changed, 4 insertions, 0 deletions
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: | |||
94 | other.d = nullptr; | 94 | other.d = nullptr; |
95 | return *this; | 95 | return *this; |
96 | } | 96 | } |
97 | |||
98 | operator bool() const { | ||
99 | return (d != nullptr); | ||
100 | } | ||
97 | private: | 101 | private: |
98 | Transaction(Transaction& other); | 102 | Transaction(Transaction& other); |
99 | Transaction& operator=(Transaction& other); | 103 | Transaction& operator=(Transaction& other); |