summaryrefslogtreecommitdiff
path: root/src/balance.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-27 08:30:15 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-27 08:30:59 -0400
commit3ea7fbd5f6db4d362af79953b23bacc904909cff (patch)
treeeb5ab88d751ec975681ae748d441f44d4799bd63 /src/balance.h
parent63ae4531b8a7c8ba268c6a4bd3c971a49d06f2db (diff)
downloadfork-ledger-3ea7fbd5f6db4d362af79953b23bacc904909cff.tar.gz
fork-ledger-3ea7fbd5f6db4d362af79953b23bacc904909cff.tar.bz2
fork-ledger-3ea7fbd5f6db4d362af79953b23bacc904909cff.zip
If doing math between amount and balance, simplify
Diffstat (limited to 'src/balance.h')
-rw-r--r--src/balance.h3
1 files changed, 3 insertions, 0 deletions
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