]> git.mxchange.org Git - simgear.git/blobdiff - simgear/props/condition.cxx
MacOS X fix
[simgear.git] / simgear / props / condition.cxx
index 7a382cd30ee44a66985ec9ab01742109bd39f81c..2c8a3e9fbf1e39c46b683cf5aea35f770f8aec11 100644 (file)
@@ -8,7 +8,7 @@
 // $Id$
 
 #ifdef HAVE_CONFIG_H
-#  include <simgear/compiler.h>
+#  include <simgear_config.h>
 #endif
 
 // #include <iostream>
@@ -18,6 +18,8 @@
 #include "props.hxx"
 #include "condition.hxx"
 
+#include <simgear/math/SGMath.hxx>
+
 using std::istream;
 using std::ostream;
 
@@ -144,8 +146,9 @@ SGOrCondition::addCondition (SGCondition * condition)
 static int
 doComparison (const SGPropertyNode * left, const SGPropertyNode *right)
 {
+  using namespace simgear;
   switch (left->getType()) {
-  case SGPropertyNode::BOOL: {
+  case props::BOOL: {
     bool v1 = left->getBoolValue();
     bool v2 = right->getBoolValue();
     if (v1 < v2)
@@ -156,7 +159,7 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode *right)
       return SGComparisonCondition::EQUALS;
     break;
   }
-  case SGPropertyNode::INT: {
+  case props::INT: {
     int v1 = left->getIntValue();
     int v2 = right->getIntValue();
     if (v1 < v2)
@@ -167,7 +170,7 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode *right)
       return SGComparisonCondition::EQUALS;
     break;
   }
-  case SGPropertyNode::LONG: {
+  case props::LONG: {
     long v1 = left->getLongValue();
     long v2 = right->getLongValue();
     if (v1 < v2)
@@ -178,7 +181,7 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode *right)
       return SGComparisonCondition::EQUALS;
     break;
   }
-  case SGPropertyNode::FLOAT: {
+  case props::FLOAT: {
     float v1 = left->getFloatValue();
     float v2 = right->getFloatValue();
     if (v1 < v2)
@@ -189,7 +192,7 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode *right)
       return SGComparisonCondition::EQUALS;
     break;
   }
-  case SGPropertyNode::DOUBLE: {
+  case props::DOUBLE: {
     double v1 = left->getDoubleValue();
     double v2 = right->getDoubleValue();
     if (v1 < v2)
@@ -200,9 +203,9 @@ doComparison (const SGPropertyNode * left, const SGPropertyNode *right)
       return SGComparisonCondition::EQUALS;
     break;
   }
-  case SGPropertyNode::STRING: 
-  case SGPropertyNode::NONE:
-  case SGPropertyNode::UNSPECIFIED: {
+  case props::STRING:
+  case props::NONE:
+  case props::UNSPECIFIED: {
     string v1 = left->getStringValue();
     string v2 = right->getStringValue();
     if (v1 < v2)