]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/terrainsampler.cxx
Merge branch 'next' of gitorious.org:fg/flightgear into next
[flightgear.git] / src / Environment / terrainsampler.cxx
index 276c8ffb1e1ece01b502b7d1d894aad36daedda7..b4a7beabf5a738174d63eaf4a578eb6d8b081bb6 100644 (file)
 #include <deque>
 
 #include "terrainsampler.hxx"
+
 using simgear::PropertyList;
+using std::deque;
+using std::vector;
+using std::ostringstream;
+using std::string;
 
-#include "tiedpropertylist.hxx"
+#include <simgear/props/tiedpropertylist.hxx>
 
 namespace Environment {
 /**
@@ -93,7 +98,7 @@ private:
     SGPropertyNode_ptr _positionLongitudeNode;
 
     deque<double> _elevations;
-    TiedPropertyList _tiedProperties;
+    simgear::TiedPropertyList _tiedProperties;
 };
 
 AreaSampler::AreaSampler( SGPropertyNode_ptr rootNode ) :
@@ -285,6 +290,7 @@ void AreaSampler::analyse()
         }
     }
 
+/*
     double alt_low_min = 0.0;
     double n_max = 0.0;
     sum = 0.0;
@@ -296,7 +302,7 @@ void AreaSampler::analyse()
             break;
         }
     }
-
+*/
     _altLayered = 0.5 * (_altMin + _altOffset);
 
 #if 0
@@ -329,7 +335,7 @@ private:
 
     SGPropertyNode_ptr _rootNode;
     bool _enabled;
-    TiedPropertyList _tiedProperties;
+    simgear::TiedPropertyList _tiedProperties;
 };
 
 TerrainSamplerImplementation::TerrainSamplerImplementation( SGPropertyNode_ptr rootNode ) :
@@ -365,6 +371,8 @@ void TerrainSamplerImplementation::reinit()
         if( subsys == NULL )
             break;
         remove_subsystem( subsystemName );
+        subsys->unbind();
+        delete subsys;
     }
     
     init();