summaryrefslogtreecommitdiff
path: root/format.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-05 19:12:23 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-05 19:12:23 -0400
commit7e87a0a0b1a8b76c44f4f678d8bfb5129ba6c5da (patch)
treeee00c3c5b17534ff44bedc9ff125eb6f3e25e40a /format.h
parent1741c80fe4f9dd896d4c8912b2ba35b14500ca1c (diff)
downloadfork-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.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/format.h b/format.h
index 661e7884..7fc46985 100644
--- a/format.h
+++ b/format.h
@@ -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);