summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-08-14 02:39:21 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-08-14 02:39:21 -0400
commit7a6d416f3b15b61d7d1c2859cd22f2c1b6c613c3 (patch)
treefb8452eb266405bcaa3cad9c958618bc149e98d3 /src
parent6555f45c9d85a100614843c89d091240f70b3de6 (diff)
downloadfork-ledger-7a6d416f3b15b61d7d1c2859cd22f2c1b6c613c3.tar.gz
fork-ledger-7a6d416f3b15b61d7d1c2859cd22f2c1b6c613c3.tar.bz2
fork-ledger-7a6d416f3b15b61d7d1c2859cd22f2c1b6c613c3.zip
Allow value_t::reduce() on any data type.
Diffstat (limited to 'src')
-rw-r--r--src/value.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/value.cc b/src/value.cc
index 09b43cbf..5a0c7e70 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -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