diff --git a/simgear/props/condition.cxx b/simgear/props/condition.cxx index 014aff45..a633cacd 100644 --- a/simgear/props/condition.cxx +++ b/simgear/props/condition.cxx @@ -235,7 +235,6 @@ SGComparisonCondition::SGComparisonCondition (Type type, bool reverse) SGComparisonCondition::~SGComparisonCondition () { - delete _right_value; } bool @@ -267,7 +266,6 @@ void SGComparisonCondition::setRightProperty( SGPropertyNode *prop_root, const char * propname ) { - delete _right_value; _right_value = 0; _right_property = prop_root->getNode(propname, true); } @@ -276,7 +274,6 @@ void SGComparisonCondition::setRightValue (const SGPropertyNode *node) { _right_property = 0; - delete _right_value; _right_value = new SGPropertyNode(*node); } diff --git a/simgear/props/condition.hxx b/simgear/props/condition.hxx index b314cc4e..01ad8faa 100644 --- a/simgear/props/condition.hxx +++ b/simgear/props/condition.hxx @@ -51,7 +51,7 @@ public: virtual ~SGPropertyCondition (); virtual bool test () const { return _node->getBoolValue(); } private: - const SGPropertyNode * _node; + SGConstPropertyNode_ptr _node; }; @@ -133,9 +133,9 @@ public: private: Type _type; bool _reverse; - const SGPropertyNode * _left_property; - const SGPropertyNode * _right_property; - const SGPropertyNode * _right_value; + SGConstPropertyNode_ptr _left_property; + SGConstPropertyNode_ptr _right_property; + SGConstPropertyNode_ptr _right_value; };