summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/value.cc12
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;
}