summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/value.cc b/src/value.cc
index 4b9f5756..4cfee747 100644
--- a/src/value.cc
+++ b/src/value.cc
@@ -1404,6 +1404,25 @@ void value_t::in_place_reduce()
//throw_(value_error, "Cannot reduce " << label());
}
+void value_t::in_place_unreduce()
+{
+ switch (type()) {
+ case AMOUNT:
+ as_amount_lval().in_place_unreduce();
+ return;
+ case BALANCE:
+ as_balance_lval().in_place_unreduce();
+ return;
+ case BALANCE_PAIR:
+ as_balance_pair_lval().in_place_unreduce();
+ return;
+ default:
+ return;
+ }
+
+ //throw_(value_error, "Cannot reduce " << label());
+}
+
value_t value_t::abs() const
{
switch (type()) {