]> git.mxchange.org Git - flightgear.git/blobdiff - src/Network/multiplay.cxx
Logging: less verbose panel loading.
[flightgear.git] / src / Network / multiplay.cxx
index 4f5c62656bd91a8939e623bcf9d3ab75e4f01e6a..f6e0e30c7865f2b7000d34edb3b209f992ff31f2 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <simgear/compiler.h>
 
-#include STL_STRING
+#include <string>
 
 #include <iostream>
 #include <map>
@@ -42,7 +42,7 @@
 
 #include "multiplay.hxx"
 
-SG_USING_STD(string);
+using std::string;
 
 
 // These constants are provided so that the ident command can list file versions.
@@ -101,13 +101,12 @@ bool FGMultiplay::open() {
     SGPropertyNode* root = globals->get_props();
 
     /// Build up the id to property map
-    unsigned i = 0;
-    while (FGMultiplayMgr::sIdPropertyList[i].name) {
+    
+    for (unsigned i = 0; i < FGMultiplayMgr::numProperties; ++i) {
       const char* name = FGMultiplayMgr::sIdPropertyList[i].name;
       SGPropertyNode* pNode = root->getNode(name);
       if (pNode)
         mPropertyMap[FGMultiplayMgr::sIdPropertyList[i].id] = pNode;
-      ++i;
     }
 
     return is_enabled();
@@ -120,7 +119,7 @@ bool FGMultiplay::open() {
 * or receive data over the network
 ******************************************************************/
 bool FGMultiplay::process() {
-
+  using namespace simgear;
   if (get_direction() == SG_IO_OUT) {
 
     // check if we have left initialization phase. That will not provide
@@ -203,17 +202,17 @@ bool FGMultiplay::process() {
       pData->type = it->second->getType();
       
       switch (pData->type) {
-        case SGPropertyNode::INT:        
-        case SGPropertyNode::LONG:       
-        case SGPropertyNode::BOOL:
+        case props::INT:
+        case props::LONG:
+        case props::BOOL:
           pData->int_value = it->second->getIntValue();
           break;
-        case SGPropertyNode::FLOAT:
-        case SGPropertyNode::DOUBLE:
+        case props::FLOAT:
+        case props::DOUBLE:
           pData->float_value = it->second->getFloatValue();
           break;
-        case SGPropertyNode::STRING:
-        case SGPropertyNode::UNSPECIFIED:
+        case props::STRING:
+        case props::UNSPECIFIED:
           {
             // FIXME: We assume unspecified are strings for the moment.