From 22c6adb1205d80dec6392a484e9175008ac5436d Mon Sep 17 00:00:00 2001 From: binrapt Date: Sun, 8 Nov 2009 02:22:58 +0100 Subject: [PATCH] Finally realised a way around that initialised state, there's actually a convenient implicit method to do it --- fridh/function.hpp | 5 +---- interpreter/function.cpp | 6 ------ parser/operator.cpp | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/fridh/function.hpp b/fridh/function.hpp index 751dbab..f6d69a3 100644 --- a/fridh/function.hpp +++ b/fridh/function.hpp @@ -125,6 +125,7 @@ namespace fridh struct parse_tree_node { parse_tree_node_type::type type; + union { variable * variable_pointer; @@ -182,10 +183,6 @@ namespace fridh { parse_tree_node function; parse_tree_nodes arguments; - - bool initialised; - - parse_tree_call(); }; struct parse_tree_array diff --git a/interpreter/function.cpp b/interpreter/function.cpp index 72a3aed..4c1a63a 100644 --- a/interpreter/function.cpp +++ b/interpreter/function.cpp @@ -1,9 +1,3 @@ -#include - namespace fridh { - parse_tree_call::parse_tree_call(): - initialised(false) - { - } } diff --git a/parser/operator.cpp b/parser/operator.cpp index 6d73ca0..602b6a3 100644 --- a/parser/operator.cpp +++ b/parser/operator.cpp @@ -36,7 +36,7 @@ namespace fridh bool is_initialised_call_node = current_node.type == parse_tree_node_type::call && - current_node.call_pointer->initialised; + i == 0; if ( -- 2.11.4.GIT