summaryrefslogtreecommitdiff
path: root/src/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-02-17 14:26:16 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-02-17 15:05:59 -0600
commitf9613fe1de8f759242a10b35f2b257f7959688e8 (patch)
treeeb008910c299d4662ce835716ddd08b0e4c4b450 /src/amount.cc
parenta3c9cc02d7e549cdc652041ebd7f070198f0eaa2 (diff)
downloadfork-ledger-f9613fe1de8f759242a10b35f2b257f7959688e8.tar.gz
fork-ledger-f9613fe1de8f759242a10b35f2b257f7959688e8.tar.bz2
fork-ledger-f9613fe1de8f759242a10b35f2b257f7959688e8.zip
Fixes for variable shadowing (3/28)
Diffstat (limited to 'src/amount.cc')
-rw-r--r--src/amount.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 8f187515..38a694a8 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -705,21 +705,21 @@ void amount_t::in_place_unreduce()
if (! quantity)
throw_(amount_error, _("Cannot unreduce an uninitialized amount"));
- amount_t temp = *this;
+ amount_t tmp = *this;
commodity_t * comm = commodity_;
bool shifted = false;
while (comm && comm->larger()) {
- amount_t next_temp = temp / comm->larger()->number();
+ amount_t next_temp = tmp / comm->larger()->number();
if (next_temp.abs() < amount_t(1L))
break;
- temp = next_temp;
+ tmp = next_temp;
comm = comm->larger()->commodity_;
shifted = true;
}
if (shifted) {
- *this = temp;
+ *this = tmp;
commodity_ = comm;
}
}