From 8cdc8008c36bd03e44e43aef3fc84ff20df7bd34 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 16 May 2007 05:38:01 +0000 Subject: Corrected problem with uninitialized value_t's. --- src/builder.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/builder.h') 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& end_pos = none) { - current = &*current->parent(); + return current = &*current->parent(); } virtual node_t * end_node(const node_t::nameid_t name_id, const optional& 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& end_pos = none) { outs << "'; + return NULL; } virtual node_t * end_node(const node_t::nameid_t name_id, const optional& end_pos = none) { end_node("hello", end_pos); + return NULL; } }; -- cgit v1.2.3