Change an exception test to a plain if
This commit is contained in:
parent
5850d041b6
commit
fd4fa8a114
1 changed files with 2 additions and 4 deletions
|
|
@ -857,12 +857,10 @@ bool value_t::is_less_than(const value_t& val) const
|
|||
case INTEGER:
|
||||
return as_amount() < val.as_long();
|
||||
case AMOUNT:
|
||||
try {
|
||||
if (as_amount().commodity() == val.as_amount().commodity())
|
||||
return as_amount() < val.as_amount();
|
||||
}
|
||||
catch (const amount_error&) {
|
||||
else
|
||||
return commodity_t::compare_by_commodity()(&as_amount(), &val.as_amount());
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue