summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2019-03-15 17:24:46 -0700
committerJohn Wiegley <johnw@newartisans.com>2019-03-15 17:29:58 -0700
commit501fbc08ae5493db77bb34f4c4fbe1f3a3bc14e3 (patch)
tree9bfbdc9b2eb0c652d415526881002640a505b4cb /src/value.cc
parentd8d3183405999a2ed4c43a8fada76298ad089777 (diff)
downloadfork-ledger-501fbc08ae5493db77bb34f4c4fbe1f3a3bc14e3.tar.gz
fork-ledger-501fbc08ae5493db77bb34f4c4fbe1f3a3bc14e3.tar.bz2
fork-ledger-501fbc08ae5493db77bb34f4c4fbe1f3a3bc14e3.zip
Change compare_by_commodity to return an integer
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/value.cc b/src/value.cc
index 5ce30530..18e78ab5 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -887,7 +887,7 @@ bool value_t::is_less_than(const value_t& val) const
! val.as_amount().has_commodity())
return as_amount() < val.as_amount();
else
- return commodity_t::compare_by_commodity()(&as_amount(), &val.as_amount());
+ return commodity_t::compare_by_commodity()(&as_amount(), &val.as_amount()) < 0;
case BALANCE:
return val.to_amount() > as_amount();
default: