(report_budget_items): Removed an unused local variable.

This commit is contained in:
John Wiegley 2005-07-13 07:24:24 +00:00
parent f9c2ddfd96
commit b79b3cf54b

15
walk.cc
View file

@ -537,8 +537,8 @@ void generate_transactions::add_transaction(const interval_t& period,
void budget_transactions::report_budget_items(const std::time_t moment)
{
if (pending_xacts.size() > 0) {
std::list<pending_xacts_list::iterator> to_clear;
if (pending_xacts.size() == 0)
return;
bool reported;
do {
@ -582,13 +582,6 @@ void budget_transactions::report_budget_items(const std::time_t moment)
}
}
} while (reported);
for (std::list<pending_xacts_list::iterator>::iterator
i = to_clear.begin();
i != to_clear.end();
i++)
pending_xacts.erase(*i);
}
}
void budget_transactions::operator()(transaction_t& xact)
@ -601,8 +594,10 @@ void budget_transactions::operator()(transaction_t& xact)
for (account_t * acct = xact.account; acct; acct = acct->parent) {
if (acct == (*i).second->account) {
xact_in_budget = true;
// Report the transaction as if it had occurred in the parent
// account.
// account. jww (2005-07-13): Note that this assignment will
// irrevocably change the underlying transaction.
if (xact.account != acct)
xact.account = acct;
goto handle;