diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-01 04:36:49 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:35 -0400 |
commit | e92bcf411d2e9a55969303ba3893a017152d7c18 (patch) | |
tree | e7b52d09751de39c86ede91f88a2fcf24facfb27 /src/transform.cc | |
parent | 50a9caf302936ba6f61bbe05b4718f199d0d584c (diff) | |
download | fork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.tar.gz fork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.tar.bz2 fork-ledger-e92bcf411d2e9a55969303ba3893a017152d7c18.zip |
Started using boost::optional<T>.
Diffstat (limited to 'src/transform.cc')
-rw-r--r-- | src/transform.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/transform.cc b/src/transform.cc index b6a25cee..7e2405fb 100644 --- a/src/transform.cc +++ b/src/transform.cc @@ -98,7 +98,7 @@ void compact_transform::execute(xml::document_t * document) account_repitem_t * acct = static_cast<account_repitem_t *>(i); acct->parents_elided = p->parents_elided + 1; - delete p; + checked_delete(p); } } @@ -116,7 +116,7 @@ void clean_transform::execute(xml::document_t * document) i->add_total(temp); if (! temp) { repitem_t * next = i->next; - delete i; + checked_delete(i); i = next; continue; } @@ -125,7 +125,7 @@ void clean_transform::execute(xml::document_t * document) else if (i->kind == repitem_t::ENTRY && ! i->contents) { assert(! i->children); repitem_t * next = i->next; - delete i; + checked_delete(i); i = next; continue; } @@ -246,7 +246,7 @@ void merge_transform::execute(xml::document_t * document) j->contents = NULL; assert(! j->children); - delete j; + checked_delete(j); } } @@ -276,14 +276,14 @@ namespace { class delete_unmarked : public repitem_t::select_callback_t { virtual void operator()(xml::document_t * document) { if (item->parent && ! (item->flags & REPITEM_FLAGGED)) - delete item; + checked_delete(item); } }; class delete_marked : public repitem_t::select_callback_t { virtual void operator()(xml::document_t * document) { if (item->flags & REPITEM_FLAGGED) - delete item; + checked_delete(item); } }; |