From 4e7d1cb390ab64e1e9627d2eb41abbd19ee67543 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 4 Jun 2012 19:10:30 -0700 Subject: [PATCH] Add an STAmount::operator bool() const --- src/SerializedTypes.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/SerializedTypes.h b/src/SerializedTypes.h index ec0987c12b..ceadb90e52 100644 --- a/src/SerializedTypes.h +++ b/src/SerializedTypes.h @@ -274,6 +274,7 @@ public: bool isNegative() const { return mIsNegative && !isZero(); } bool isPositive() const { return !mIsNegative && !isZero(); } bool isGEZero() const { return !mIsNegative; } + operator bool() const { return !isZero(); } void changeSign() { if (!isZero()) mIsNegative = !mIsNegative; } void zero() { mOffset = mIsNative ? -100 : 0; mValue = 0; mIsNegative = false; }