]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/realwx_ctrl.cxx
Merge branch 'next' into durk-atc
[flightgear.git] / src / Environment / realwx_ctrl.cxx
index 71f52d7bad0820950f1d17d301c1989929a70ac7..621fb11c3c829ba76c0c98214937c049aab5837f 100644 (file)
@@ -25,7 +25,6 @@
 #endif
 
 #include "realwx_ctrl.hxx"
-#include "tiedpropertylist.hxx"
 #include "metarproperties.hxx"
 #include "metarairportfilter.hxx"
 #include "fgmetar.hxx"
 
 #include <simgear/structure/exception.hxx>
 #include <simgear/misc/strutils.hxx>
+#include <simgear/props/tiedpropertylist.hxx>
 #include <algorithm>
 #if defined(ENABLE_THREADS)
 #include <OpenThreads/Thread>
 #include <simgear/threads/SGQueue.hxx>
 #endif
 
+using simgear::PropertyList;
 
 namespace Environment {
 
@@ -69,6 +70,7 @@ LiveMetarProperties::LiveMetarProperties( SGPropertyNode_ptr rootNode ) :
 
 LiveMetarProperties::~LiveMetarProperties()
 {
+    _tiedProperties.Untie();
 }
 
 void LiveMetarProperties::update( double dt )
@@ -105,8 +107,8 @@ protected:
 
     bool _enabled;
     bool __enabled;
-    TiedPropertyList _tiedProperties;
;   typedef std::vector<LiveMetarProperties_ptr> MetarPropertiesList;
+    simgear::TiedPropertyList _tiedProperties;
+    typedef std::vector<LiveMetarProperties_ptr> MetarPropertiesList;
     MetarPropertiesList _metarProperties;
 };
 
@@ -195,18 +197,18 @@ public:
 
     class MetarLoadRequest {
     public:
-        MetarLoadRequest( const string & stationId ) {
-            _stationId = stationId;
-            _proxyHost = fgGetNode("/sim/presets/proxy/host", true)->getStringValue();
-            _proxyPort = fgGetNode("/sim/presets/proxy/port", true)->getStringValue();
-            _proxyAuth = fgGetNode("/sim/presets/proxy/authentication", true)->getStringValue();
-        }
-        MetarLoadRequest( const MetarLoadRequest & other ) {
-            _stationId = other._stationId;
-            _proxyHost = other._proxyAuth;
-            _proxyPort = other._proxyPort;
-            _proxyAuth = other._proxyAuth;
-        }
+        MetarLoadRequest( const string & stationId ) :
+            _stationId(stationId),
+            _proxyHost(fgGetNode("/sim/presets/proxy/host", true)->getStringValue()),
+            _proxyPort(fgGetNode("/sim/presets/proxy/port", true)->getStringValue()),
+            _proxyAuth(fgGetNode("/sim/presets/proxy/authentication", true)->getStringValue())
+        {}
+        MetarLoadRequest( const MetarLoadRequest & other ) :
+            _stationId(other._stationId),
+            _proxyHost(other._proxyAuth),
+            _proxyPort(other._proxyPort),
+            _proxyAuth(other._proxyAuth)
+        {}
         string _stationId;
         string _proxyHost;
         string _proxyPort;