diff options
author | John Wiegley <johnw@newartisans.com> | 2007-04-20 02:14:53 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:28 -0400 |
commit | b84f676946941df6f7e8476d77d1db0cbe7736c5 (patch) | |
tree | 9ee7c7a2d3b7496b38ad127519210adfeced2241 /format.h | |
parent | 539370ff1b37772e9f11439f652ffd3583beeedb (diff) | |
download | ledger-b84f676946941df6f7e8476d77d1db0cbe7736c5.tar.gz ledger-b84f676946941df6f7e8476d77d1db0cbe7736c5.tar.bz2 ledger-b84f676946941df6f7e8476d77d1db0cbe7736c5.zip |
Did some optimization and memory cleanup
Diffstat (limited to 'format.h')
-rw-r--r-- | format.h | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -20,7 +20,7 @@ class format_t enum kind_t { UNKNOWN, TEXT, COLUMN, XPATH, GROUP } kind; union { - std::string * chars; + string * chars; xml::xpath_t * xpath; format_t * format; }; @@ -60,7 +60,7 @@ class format_t xml::node_t * context, int column) const; }; - std::string format_string; + string format_string; std::list<element_t *> elements; private: @@ -70,8 +70,8 @@ class format_t format_t() { TRACE_CTOR("format_t()"); } - format_t(const std::string& fmt) { - TRACE_CTOR("format_t(const std::string&)"); + format_t(const string& fmt) { + TRACE_CTOR("format_t(const string&)"); parse(fmt); } @@ -88,9 +88,9 @@ class format_t clear_elements(); } - void parse(const std::string& fmt); + void parse(const string& fmt); - void compile(const std::string& fmt, xml::node_t * context = NULL) { + void compile(const string& fmt, xml::node_t * context = NULL) { parse(fmt); compile(context); } @@ -107,7 +107,7 @@ class format_t class format_error : public error { public: - format_error(const std::string& reason, error_context * ctxt = NULL) throw() + format_error(const string& reason, error_context * ctxt = NULL) throw() : error(reason, ctxt) {} virtual ~format_error() throw() {} }; |