summaryrefslogtreecommitdiff
path: root/src/balance.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/balance.h')
-rw-r--r--src/balance.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/balance.h b/src/balance.h
index fcf4fe36..d00fadb1 100644
--- a/src/balance.h
+++ b/src/balance.h
@@ -324,12 +324,24 @@ public:
temp += pair.second.round();
return temp;
}
+ balance_t& in_place_round() {
+ foreach (amounts_map::value_type& pair, amounts)
+ pair.second.in_place_round();
+ return *this;
+ }
+
balance_t round(amount_t::precision_t prec) const {
balance_t temp;
foreach (const amounts_map::value_type& pair, amounts)
temp += pair.second.round(prec);
return temp;
}
+ balance_t& in_place_round(amount_t::precision_t prec) {
+ foreach (amounts_map::value_type& pair, amounts)
+ pair.second.in_place_round(prec);
+ return *this;
+ }
+
balance_t unround() const {
balance_t temp;
foreach (const amounts_map::value_type& pair, amounts)