(We are currently getting a lot of aborts in the condition code when
running MP. I don't expect this to fix it, but a bug is a bug.)
(reviewed by Fred, who also fixed *my* bugs :-)
SGComparisonCondition::~SGComparisonCondition ()
{
- delete _right_value;
}
bool
SGComparisonCondition::setRightProperty( SGPropertyNode *prop_root,
const char * propname )
{
- delete _right_value;
_right_value = 0;
_right_property = prop_root->getNode(propname, true);
}
SGComparisonCondition::setRightValue (const SGPropertyNode *node)
{
_right_property = 0;
- delete _right_value;
_right_value = new SGPropertyNode(*node);
}
virtual ~SGPropertyCondition ();
virtual bool test () const { return _node->getBoolValue(); }
private:
- const SGPropertyNode * _node;
+ SGConstPropertyNode_ptr _node;
};
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;
};