summaryrefslogtreecommitdiff
path: root/value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'value.cc')
-rw-r--r--value.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/value.cc b/value.cc
index 9bb92e7d..8ee3b09b 100644
--- a/value.cc
+++ b/value.cc
@@ -1129,6 +1129,25 @@ value_t value_t::value(const std::time_t moment) const
}
}
+void value_t::reduce()
+{
+ switch (type) {
+ case BOOLEAN:
+ case DATETIME:
+ case INTEGER:
+ break;
+ case AMOUNT:
+ ((amount_t *) data)->reduce();
+ break;
+ case BALANCE:
+ ((balance_t *) data)->reduce();
+ break;
+ case BALANCE_PAIR:
+ ((balance_pair_t *) data)->reduce();
+ break;
+ }
+}
+
void value_t::round()
{
switch (type) {