]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/environment_ctrl.hxx
More fixes to get the code working when threads are disabled.
[flightgear.git] / src / Environment / environment_ctrl.hxx
index 054a0a2f9ec3577d35c12183adb04713f6e0a6ae..bb3460484ff1c626838b8cdf33ae779d83ecb3e6 100644 (file)
@@ -27,7 +27,7 @@
 #include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/environment/metar.hxx>
 
-#ifdef ENABLE_THREADS
+#if defined(ENABLE_THREADS) && ENABLE_THREADS
 # include <simgear/threads/SGThread.hxx>
 # include <simgear/threads/SGQueue.hxx>
 #endif
@@ -183,7 +183,7 @@ private:
 
 private:
 
-#ifdef ENABLE_THREADS
+#if defined(ENABLE_THREADS) && ENABLE_THREADS
     /**
      * FIFO queue which holds a pointer to the fetched metar data.
      */
@@ -205,7 +205,7 @@ private:
     queue < FGMetarResult > result_queue;
 #endif
 
-#ifdef ENABLE_THREADS
+#if defined(ENABLE_THREADS) && ENABLE_THREADS
     /**
      * This class represents the thread of execution responsible for
      * fetching the metar data.
@@ -217,7 +217,7 @@ private:
         ~MetarThread() {}
 
         /**
-         * Fetched the metar data from the NOAA.
+         * Fetche the metar data from the NOAA.
          */
         void run();
 
@@ -248,7 +248,12 @@ private:
      * Thread cleanup handler.
      */
     friend void metar_cleanup_handler( void* );
+
 #endif // ENABLE_THREADS
+
+    int _error_count;
+    double _dt;
+    double _error_dt;
 };
 
 #endif // _ENVIRONMENT_CTRL_HXX