diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-05 19:12:23 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-05 19:12:23 -0400 |
commit | 7e87a0a0b1a8b76c44f4f678d8bfb5129ba6c5da (patch) | |
tree | ee00c3c5b17534ff44bedc9ff125eb6f3e25e40a /format.h | |
parent | 1741c80fe4f9dd896d4c8912b2ba35b14500ca1c (diff) | |
download | fork-ledger-7e87a0a0b1a8b76c44f4f678d8bfb5129ba6c5da.tar.gz fork-ledger-7e87a0a0b1a8b76c44f4f678d8bfb5129ba6c5da.tar.bz2 fork-ledger-7e87a0a0b1a8b76c44f4f678d8bfb5129ba6c5da.zip |
added back sorting support
Diffstat (limited to 'format.h')
-rw-r--r-- | format.h | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -49,13 +49,16 @@ struct element_t struct format_t { - std::auto_ptr<element_t> elements; + element_t * elements; - static std::auto_ptr<node_t> value_expr; - static std::auto_ptr<node_t> total_expr; + static std::auto_ptr<node_t> value_expr; + static std::auto_ptr<node_t> total_expr; format_t(const std::string& _format) { - elements.reset(parse_elements(_format)); + elements = parse_elements(_format); + } + ~format_t() { + if (elements) delete elements; } static element_t * parse_elements(const std::string& fmt); |