]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/mk_viii.hxx
As discussed on the mailing list, make the 'nearest' GPS command use scratch lat...
[flightgear.git] / src / Instrumentation / mk_viii.hxx
index f134084402af57568c91a782d95b9ba2241a277a..6e28b74fce9c2e9554713bb49b801bfc04f7ba31 100755 (executable)
@@ -36,9 +36,14 @@ using std::vector;
 using std::deque;
 using std::map;
 
-#include "Airports/runways.hxx"
-#include "Airports/simple.hxx"
-#include "Main/globals.hxx"
+#include <Airports/runways.hxx>
+#include <Airports/simple.hxx>
+#include <Main/globals.hxx>
+
+#ifdef _MSC_VER
+#  pragma warning( push )
+#  pragma warning( disable: 4355 )
+#endif
 
 ///////////////////////////////////////////////////////////////////////////////
 // MK_VIII ////////////////////////////////////////////////////////////////////
@@ -47,7 +52,7 @@ using std::map;
 class MK_VIII : public SGSubsystem
 {
   // keep in sync with Mode6Handler::altitude_callout_definitions[]
-  static const int n_altitude_callouts = 11;
+  static const unsigned n_altitude_callouts = 11;
 
   /////////////////////////////////////////////////////////////////////////////
   // MK_VIII::RawValueMethodsData /////////////////////////////////////////////
@@ -68,7 +73,7 @@ class MK_VIII : public SGSubsystem
       if (_getter)
        return (_obj.*_getter)(_data);
       else
-       return SGRawValue<VT>::DefaultValue;
+       return SGRawValue<VT>::DefaultValue();
     }
     virtual bool setValue (VT value)
     {
@@ -777,7 +782,7 @@ public:
       Element *element;
 
       inline Voice (VoicePlayer *_player)
-       : player(_player), volume(1.0), element(NULL) {}
+        : element(NULL), player(_player), volume(1.0) {}
 
       ~Voice ();
 
@@ -847,7 +852,7 @@ public:
     } voices;
 
     inline VoicePlayer (MK_VIII *device)
-      : mk(device), speaker(this), voice(NULL), next_voice(NULL) {}
+      : voice(NULL), next_voice(NULL),  mk(device), speaker(this) {}
 
     ~VoicePlayer ();
 
@@ -912,13 +917,13 @@ public:
 
       inline Speaker (VoicePlayer *_player)
        : player(_player),
-         volume(1),
          pitch(1),
          inner_cone(360),
          outer_cone(360),
          outer_gain(0),
          reference_dist(3),
-         max_dist(10)
+         max_dist(10),
+         volume(1)
       {
        position[0] = 0; position[1] = 0; position[2] = 0;
        orientation[0] = 0; orientation[1] = 0; orientation[2] = 0;
@@ -1026,7 +1031,7 @@ private:
     State state;
 
     inline SelfTestHandler (MK_VIII *device)
-      : mk(device), state(STATE_NONE), button_pressed(false) {}
+      : mk(device), button_pressed(false), state(STATE_NONE) {}
 
     inline void power_off () { stop(); }
     inline void set_inop () { stop(); }
@@ -1505,13 +1510,17 @@ private:
     unsigned int get_bank_angle_alerts ();
     void update_bank_angle ();
     
-    class AirportFilter : public FGAirportSearchFilter
+    class AirportFilter : public FGAirport::AirportFilter
     {
     public: 
       AirportFilter(Mode6Handler *s)
         : self(s) {}
         
-      virtual bool pass(FGAirport *a);
+      virtual bool passAirport(FGAirport *a) const;
+      
+      virtual FGPositioned::Type maxType() const {
+        return FGPositioned::AIRPORT;
+      }
       
     private:
       Mode6Handler* self;
@@ -1578,14 +1587,13 @@ private:
     bool is_tcf ();
     bool is_rfcf ();
 
-    class AirportFilter : public FGAirportSearchFilter
+    class AirportFilter : public FGAirport::AirportFilter
     {
     public: 
       AirportFilter(MK_VIII *device)
         : mk(device) {}
         
-      virtual bool pass(FGAirport *a);
-      
+      virtual bool passAirport(FGAirport *a) const;
     private:
       MK_VIII* mk;
     };
@@ -1639,4 +1647,8 @@ public:
   virtual void update (double dt);
 };
 
+#ifdef _MSC_VER
+#  pragma warning( pop )
+#endif
+
 #endif // __INSTRUMENTS_MK_VIII_HXX