Allow value_t::reduce() on any data type.
This commit is contained in:
parent
6555f45c9d
commit
7a6d416f3b
1 changed files with 2 additions and 4 deletions
|
|
@ -1332,8 +1332,6 @@ value_t value_t::value(const optional<datetime_t>& moment) const
|
|||
void value_t::in_place_reduce()
|
||||
{
|
||||
switch (type()) {
|
||||
case INTEGER:
|
||||
return;
|
||||
case AMOUNT:
|
||||
as_amount_lval().in_place_reduce();
|
||||
return;
|
||||
|
|
@ -1344,10 +1342,10 @@ void value_t::in_place_reduce()
|
|||
as_balance_pair_lval().in_place_reduce();
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
throw_(value_error, "Cannot reduce " << label());
|
||||
//throw_(value_error, "Cannot reduce " << label());
|
||||
}
|
||||
|
||||
value_t value_t::abs() const
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue