From 3ea7fbd5f6db4d362af79953b23bacc904909cff Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 27 Oct 2009 08:30:15 -0400 Subject: If doing math between amount and balance, simplify --- src/balance.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/balance.h') diff --git a/src/balance.h b/src/balance.h index 765c46dd..fe8afe2b 100644 --- a/src/balance.h +++ b/src/balance.h @@ -417,6 +417,9 @@ public: bool is_empty() const { return amounts.size() == 0; } + bool single_amount() const { + return amounts.size() == 1; + } /** * Conversion methods. A balance can be converted to an amount, but -- cgit v1.2.3