]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/input_output/FGPropertyManager.cpp
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / FDM / JSBSim / input_output / FGPropertyManager.cpp
old mode 100755 (executable)
new mode 100644 (file)
index 899565e..c0218ec
@@ -53,7 +53,7 @@ std::vector<std::string> FGPropertyManager::tied_properties;
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-void FGPropertyManager::unbind(void)
+void FGPropertyManager::Unbind(void)
 {
     vector<string>::iterator it;
     for (it = tied_properties.begin();it < tied_properties.end();it++)
@@ -314,11 +314,12 @@ void FGPropertyManager::Untie (const string &name)
 
 void FGPropertyManager::Tie (const string &name, bool *pointer, bool useDefault)
 {
-  tied_properties.push_back(name);
   if (!tie(name.c_str(), SGRawValuePointer<bool>(pointer), useDefault))
     cerr << "Failed to tie property " << name << " to a pointer" << endl;
-  else if (debug_lvl & 0x20)
-    cout << name << endl;
+  else {
+    tied_properties.push_back(name);
+    if (debug_lvl & 0x20) std::cout << name << std::endl;
+  }
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -326,11 +327,12 @@ void FGPropertyManager::Tie (const string &name, bool *pointer, bool useDefault)
 void FGPropertyManager::Tie (const string &name, int *pointer,
                                           bool useDefault )
 {
-  tied_properties.push_back(name);
   if (!tie(name.c_str(), SGRawValuePointer<int>(pointer), useDefault))
     cerr << "Failed to tie property " << name << " to a pointer" << endl;
-  else if (debug_lvl & 0x20)
-    cout << name << endl;
+  else {
+    tied_properties.push_back(name);
+    if (debug_lvl & 0x20) std::cout << name << std::endl;
+  }
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -338,11 +340,12 @@ void FGPropertyManager::Tie (const string &name, int *pointer,
 void FGPropertyManager::Tie (const string &name, long *pointer,
                                           bool useDefault )
 {
-  tied_properties.push_back(name);
   if (!tie(name.c_str(), SGRawValuePointer<long>(pointer), useDefault))
     cerr << "Failed to tie property " << name << " to a pointer" << endl;
-  else if (debug_lvl & 0x20)
-    cout << name << endl;
+  else {
+    tied_properties.push_back(name);
+    if (debug_lvl & 0x20) std::cout << name << std::endl;
+  }
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -350,22 +353,24 @@ void FGPropertyManager::Tie (const string &name, long *pointer,
 void FGPropertyManager::Tie (const string &name, float *pointer,
                                           bool useDefault )
 {
-  tied_properties.push_back(name);
   if (!tie(name.c_str(), SGRawValuePointer<float>(pointer), useDefault))
     cerr << "Failed to tie property " << name << " to a pointer" << endl;
-  else if (debug_lvl & 0x20)
-    cout << name << endl;
+  else {
+    tied_properties.push_back(name);
+    if (debug_lvl & 0x20) std::cout << name << std::endl;
+  }
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 void FGPropertyManager::Tie (const string &name, double *pointer, bool useDefault)
 {
-  tied_properties.push_back(name);
   if (!tie(name.c_str(), SGRawValuePointer<double>(pointer), useDefault))
     cerr << "Failed to tie property " << name << " to a pointer" << endl;
-  else if (debug_lvl & 0x20)
-    cout << name << endl;
+  else {
+    tied_properties.push_back(name);
+    if (debug_lvl & 0x20) std::cout << name << std::endl;
+  }
 }
 
 } // namespace JSBSim