summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/amount.cc b/amount.cc
index d8e5a85d..6802ce15 100644
--- a/amount.cc
+++ b/amount.cc
@@ -892,9 +892,6 @@ amount_t commodity_t::value(const std::time_t moment)
std::time_t age = 0;
amount_t price;
- if (updater)
- (*updater)(this, age, price, moment);
-
for (history_map::reverse_iterator i = history.rbegin();
i != history.rend();
i++)
@@ -904,6 +901,9 @@ amount_t commodity_t::value(const std::time_t moment)
break;
}
+ if (updater)
+ (*updater)(this, moment, age, price);
+
return price;
}