X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fstructure%2FSGExpression.cxx;h=78d6daf0f7355072900695826dbc8f9fb7d75313;hb=b9a34b1b05ce9cab1b4b67816d7d24bd2bc364b7;hp=a6776636a0eba906dc6b070ea4251d1c0e9f012a;hpb=2a2e2716bdfbecb3494ab935171ed6224a178470;p=simgear.git diff --git a/simgear/structure/SGExpression.cxx b/simgear/structure/SGExpression.cxx index a6776636..78d6daf0 100644 --- a/simgear/structure/SGExpression.cxx +++ b/simgear/structure/SGExpression.cxx @@ -293,6 +293,21 @@ SGReadIExpression(SGPropertyNode *inputRoot, const SGPropertyNode *expression) } return output; } + + if (name == "difference" || name == "dif" ) { + if (expression->nChildren() < 1) { + SG_LOG(SG_IO, SG_ALERT, "Cannot read \"" << name << "\" expression."); + return 0; + } + SGDifferenceExpression* output = new SGDifferenceExpression; + if (!SGReadNaryOperands(output, inputRoot, expression)) { + delete output; + SG_LOG(SG_IO, SG_ALERT, "Cannot read \"" << name << "\" expression."); + return 0; + } + return output; + } + if (name == "prod" || name == "product") { if (expression->nChildren() < 1) { SG_LOG(SG_IO, SG_ALERT, "Cannot read \"" << name << "\" expression.");