]> git.mxchange.org Git - flightgear.git/blobdiff - src/Systems/vacuum.cxx
Canvas: Add new element type map for geo mapping.
[flightgear.git] / src / Systems / vacuum.cxx
index cab464404fdd8dc89cea069683d978dc3472b802..b7f91e0ec29dd2f8dbb2aced1c4bb1cb78b4f1b6 100644 (file)
@@ -8,6 +8,9 @@
 #endif
 
 #include "vacuum.hxx"
+
+#include <cstring>
+
 #include <Main/fg_props.hxx>
 
 
@@ -17,20 +20,10 @@ VacuumSystem::VacuumSystem ( SGPropertyNode *node )
     _num(node->getIntValue("number", 0)),
     _scale(node->getDoubleValue("scale", 1.0))
 {
-    _rpms.clear();
-    int i;
-    for ( i = 0; i < node->nChildren(); ++i ) {
+    for ( int i = 0; i < node->nChildren(); ++i ) {
         SGPropertyNode *child = node->getChild(i);
-        string cname = child->getName();
-        string cval = child->getStringValue();
-        if ( cname == "rpm" ) {
-            _rpms.push_back(cval);
-        } else {
-            SG_LOG( SG_SYSTEMS, SG_WARN, "Error in vacuum config logic" );
-            if ( _name.length() ) {
-                SG_LOG( SG_SYSTEMS, SG_WARN, "Section = " << _name );
-            }
-        }
+        if (!strcmp(child->getName(), "rpm"))
+            _rpms.push_back(child->getStringValue());
     }
 }
 
@@ -42,7 +35,7 @@ void
 VacuumSystem::init()
 {
     unsigned int i;
-    string branch;
+    std::string branch;
     branch = "/systems/" + _name;
 
     SGPropertyNode *node = fgGetNode(branch.c_str(), _num, true );