diff options
author | Craig Earls <enderw88@gmail.com> | 2014-02-24 14:17:57 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2014-02-24 14:17:57 -0700 |
commit | 0b4ce5698622eb361e702825b187ebfceb970789 (patch) | |
tree | c892d4d8aae61bcbf0d071867be5697b75a5ddbb /src/value.cc | |
parent | bb8e000d5b35fc4a42c61cf92037674c09d996ca (diff) | |
parent | bc08eed3cb1bdb4f67d1b77273f3254d0cf13be2 (diff) | |
download | fork-ledger-0b4ce5698622eb361e702825b187ebfceb970789.tar.gz fork-ledger-0b4ce5698622eb361e702825b187ebfceb970789.tar.bz2 fork-ledger-0b4ce5698622eb361e702825b187ebfceb970789.zip |
Merge commit 'bc08eed3cb1bdb4f67d1b77273f3254d0cf13be2'
Diffstat (limited to 'src/value.cc')
-rw-r--r-- | src/value.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/value.cc b/src/value.cc index 75dc7d44..70a8ab43 100644 --- a/src/value.cc +++ b/src/value.cc @@ -870,6 +870,8 @@ bool value_t::is_less_than(const value_t& val) const return as_long() < val.as_long(); case AMOUNT: return val.as_amount() > as_long(); + case BALANCE: + return val.to_amount() > as_long(); default: break; } @@ -886,6 +888,8 @@ bool value_t::is_less_than(const value_t& val) const return as_amount() < val.as_amount(); else return commodity_t::compare_by_commodity()(&as_amount(), &val.as_amount()); + case BALANCE: + return val.to_amount() > as_amount(); default: break; } @@ -904,6 +908,8 @@ bool value_t::is_less_than(const value_t& val) const } return ! no_amounts; } + case BALANCE: + return val.to_amount() > to_amount(); default: break; } @@ -990,6 +996,8 @@ bool value_t::is_greater_than(const value_t& val) const return as_long() > val.as_long(); case AMOUNT: return val.as_amount() < as_long(); + case BALANCE: + return val.to_amount() < as_long(); default: break; } @@ -1001,6 +1009,8 @@ bool value_t::is_greater_than(const value_t& val) const return as_amount() > val.as_long(); case AMOUNT: return as_amount() > val.as_amount(); + case BALANCE: + return val.to_amount() < as_amount(); default: break; } @@ -1019,6 +1029,8 @@ bool value_t::is_greater_than(const value_t& val) const } return ! no_amounts; } + case BALANCE: + return val.to_amount() < to_amount(); default: break; } |