]> git.mxchange.org Git - simgear.git/commitdiff
Revert "Allow the not operator in expressions" - this is not required for
authorFrederic Bouvier <fredfgfs01@free.fr>
Tue, 6 Mar 2012 22:15:18 +0000 (23:15 +0100)
committerFrederic Bouvier <fredfgfs01@free.fr>
Tue, 6 Mar 2012 22:15:18 +0000 (23:15 +0100)
effects

This reverts commit 92074f0d3c29ed5d064db0c943cf88760c930e23.

simgear/structure/SGExpression.cxx

index b14a5a50190568615947f92aa6f8c508514cb5bc..6f292e46faa8ed596044ac30a77560104b4491b9 100644 (file)
@@ -866,23 +866,6 @@ Expression* logicopParser(const SGPropertyNode* exp, Parser* parser)
 ExpParserRegistrar andRegistrar("and", logicopParser<AndExpression>);
 ExpParserRegistrar orRegistrar("or", logicopParser<OrExpression>);
 
-Expression* notLogicopParser(const SGPropertyNode* exp, Parser* parser)
-{
-    using namespace boost;
-    vector<Expression*> children;
-    parser->readChildren(exp, children);
-    vector<Expression*>::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<bool>*>(children[0]));
-    return expr;
-}
-
-ExpParserRegistrar notRegistrar("not", notLogicopParser);
-
 int BindingLayout::addBinding(const string& name, Type type)
 {
     //XXX error checkint