summaryrefslogtreecommitdiff
path: root/walk.h
diff options
context:
space:
mode:
Diffstat (limited to 'walk.h')
-rw-r--r--walk.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/walk.h b/walk.h
index f5e48beb..073b7c9d 100644
--- a/walk.h
+++ b/walk.h
@@ -191,24 +191,31 @@ class collapse_transactions : public item_handler<transaction_t>
class changed_value_transactions : public item_handler<transaction_t>
{
- entry_t modified_entry;
- transaction_t modified_xact;
transaction_t * last_xact;
item_handler<transaction_t> * handler;
+ entries_deque entry_temps;
+ transactions_deque xact_temps;
+
public:
changed_value_transactions(item_handler<transaction_t> * _handler)
- : modified_xact(&modified_entry, NULL), last_xact(NULL),
- handler(_handler) {
- assert(handler);
- modified_entry.payee = "Commodities revalued";
- }
+ : last_xact(NULL), handler(_handler) {}
virtual ~changed_value_transactions() {
flush();
handler->flush();
delete handler;
+
+ for (entries_deque::iterator i = entry_temps.begin();
+ i != entry_temps.end();
+ i++)
+ delete *i;
+
+ for (transactions_deque::iterator i = xact_temps.begin();
+ i != xact_temps.end();
+ i++)
+ delete *i;
}
virtual void flush() {