From: Frederic Bouvier Date: Tue, 6 Mar 2012 22:15:18 +0000 (+0100) Subject: Revert "Allow the not operator in expressions" - this is not required for X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a7379c88f4142bedea9b6dceec6eb4198e502eaa;p=simgear.git Revert "Allow the not operator in expressions" - this is not required for effects This reverts commit 92074f0d3c29ed5d064db0c943cf88760c930e23. --- diff --git a/simgear/structure/SGExpression.cxx b/simgear/structure/SGExpression.cxx index b14a5a50..6f292e46 100644 --- a/simgear/structure/SGExpression.cxx +++ b/simgear/structure/SGExpression.cxx @@ -866,23 +866,6 @@ Expression* logicopParser(const SGPropertyNode* exp, Parser* parser) ExpParserRegistrar andRegistrar("and", logicopParser); ExpParserRegistrar orRegistrar("or", logicopParser); -Expression* notLogicopParser(const SGPropertyNode* exp, Parser* parser) -{ - using namespace boost; - vector children; - parser->readChildren(exp, children); - vector::iterator notBool = - find_if(children.begin(), children.end(), - boost::bind(&Expression::getType, _1) != BOOL); - if (notBool != children.end() || children.size() != 1) - throw("non boolean operand to not expression"); - NotExpression *expr = new NotExpression; - expr->setOperand(static_cast< ::SGExpression*>(children[0])); - return expr; -} - -ExpParserRegistrar notRegistrar("not", notLogicopParser); - int BindingLayout::addBinding(const string& name, Type type) { //XXX error checkint