summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/amount.cc9
-rw-r--r--src/amount.h2
2 files changed, 2 insertions, 9 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 604519df..da8cd6fc 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -685,14 +685,7 @@ void amount_t::in_place_roundto(int places)
if (! quantity)
throw_(amount_error, _("Cannot round an uninitialized amount"));
- // <https://github.com/ledger/ledger/issues/2362>
- // _dup() call (see in_place_ceiling and in_place_floor)
- // leads to 2 failures in the balance/testRound test,
- // however in its absence this method affects copies of amount_t instances.
- // Remove expected_failures from amount/testRound
- // and update balance/testRound
- // when uncommenting the following line.
- // _dup();
+ _dup();
mpz_t& scale(temp);
if (places)
diff --git a/src/amount.h b/src/amount.h
index 7abaa1c9..5638abc9 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -347,7 +347,7 @@ public:
amount_t roundto(int places) const {
amount_t temp(*this);
- temp.in_place_round();
+ temp.in_place_roundto(places);
return temp;
}
void in_place_roundto(int places);