Add an STAmount::operator bool() const

This commit is contained in:
JoelKatz
2012-06-04 19:10:30 -07:00
parent b186b45c76
commit 4e7d1cb390

View File

@@ -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; }