diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-16 05:38:01 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:52 -0400 |
commit | 8cdc8008c36bd03e44e43aef3fc84ff20df7bd34 (patch) | |
tree | b4efb59a6c41d22cbc7e651f8ce215e38e95bfc4 /src/builder.h | |
parent | 8a2b87e6e1f5cd8784130f3cfcd1911b214c55cc (diff) | |
download | ledger-8cdc8008c36bd03e44e43aef3fc84ff20df7bd34.tar.gz ledger-8cdc8008c36bd03e44e43aef3fc84ff20df7bd34.tar.bz2 ledger-8cdc8008c36bd03e44e43aef3fc84ff20df7bd34.zip |
Corrected problem with uninitialized value_t's.
Diffstat (limited to 'src/builder.h')
-rw-r--r-- | src/builder.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/builder.h b/src/builder.h index 1952fe63..b1fae018 100644 --- a/src/builder.h +++ b/src/builder.h @@ -37,6 +37,8 @@ protected: position_t current_position; public: + virtual ~builder_t() {} + virtual void set_start_position(std::istream& in) {} virtual void set_position(const position_t& position) {} virtual position_t& position() { return current_position; } @@ -134,11 +136,11 @@ public: virtual node_t * end_node(const string& name, const optional<position_t>& end_pos = none) { - current = &*current->parent(); + return current = &*current->parent(); } virtual node_t * end_node(const node_t::nameid_t name_id, const optional<position_t>& end_pos = none) { - current = &*current->parent(); + return current = &*current->parent(); } }; @@ -236,10 +238,12 @@ public: virtual node_t * end_node(const string& name, const optional<position_t>& end_pos = none) { outs << "</" << name << '>'; + return NULL; } virtual node_t * end_node(const node_t::nameid_t name_id, const optional<position_t>& end_pos = none) { end_node("hello", end_pos); + return NULL; } }; |