From 6acf1c12fc02d6dfd29de894b033ce163640d7ae Mon Sep 17 00:00:00 2001 From: James Turner Date: Thu, 4 Jul 2013 20:24:56 +0100 Subject: [PATCH] Fix unused private vars. Xcode is warning about these, they're a mixture of copy-pasted code, evolved use (e.g. using a property node to store state), and so on. --- src/AIModel/AIEscort.hxx | 4 +--- src/AIModel/AIManager.hxx | 1 - src/Environment/atmosphere.cxx | 2 +- src/Environment/atmosphere.hxx | 3 --- src/Input/FGMacOSXEventInput.cxx | 2 +- src/Input/FGMacOSXEventInput.hxx | 1 - src/Instrumentation/HUD/HUD_private.hxx | 2 -- src/Instrumentation/slip_skid_ball.hxx | 3 --- src/Instrumentation/tacan.hxx | 2 -- src/Instrumentation/tcas.cxx | 14 ++++++++------ src/Instrumentation/tcas.hxx | 4 +++- 11 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/AIModel/AIEscort.hxx b/src/AIModel/AIEscort.hxx index 38531eb55..4f0522622 100644 --- a/src/AIModel/AIEscort.hxx +++ b/src/AIModel/AIEscort.hxx @@ -76,11 +76,9 @@ private: SGGeod _tgtpos; bool _solid; // if true ground is solid for FDMs - double _load_resistance; // ground load resistanc N/m^2 - double _frictionFactor; // dimensionless modifier for Coefficient of Friction double _tgtrange, _tgtbrg; double _ht_agl_ft; - double _relbrg, _truebrg; + double _relbrg; double _parent_speed, _parent_hdg; double _interval; diff --git a/src/AIModel/AIManager.hxx b/src/AIModel/AIManager.hxx index 605577d19..a7d2dcb8b 100644 --- a/src/AIModel/AIManager.hxx +++ b/src/AIModel/AIManager.hxx @@ -122,7 +122,6 @@ private: double user_yaw; double user_roll; double user_speed; - double user_agl; double wind_from_east; double wind_from_north; diff --git a/src/Environment/atmosphere.cxx b/src/Environment/atmosphere.cxx index d3f8f59e7..b7130aea3 100644 --- a/src/Environment/atmosphere.cxx +++ b/src/Environment/atmosphere.cxx @@ -223,7 +223,7 @@ void FGAtmoCache::check_model() { ////////////////////////////////////////////////////////////////////// -FGAltimeter::FGAltimeter() : kset(atmodel::ISA::P0), kft(0) +FGAltimeter::FGAltimeter() { cache(); } diff --git a/src/Environment/atmosphere.hxx b/src/Environment/atmosphere.hxx index 466cba270..8c21186bb 100644 --- a/src/Environment/atmosphere.hxx +++ b/src/Environment/atmosphere.hxx @@ -136,9 +136,6 @@ public: class FGAltimeter : public FGAtmoCache { - double kset; - double kft; - public: FGAltimeter(); double reading_ft(const double p_inHg, diff --git a/src/Input/FGMacOSXEventInput.cxx b/src/Input/FGMacOSXEventInput.cxx index 5c0fe4505..a969fd6e2 100644 --- a/src/Input/FGMacOSXEventInput.cxx +++ b/src/Input/FGMacOSXEventInput.cxx @@ -343,7 +343,7 @@ void HIDElement::generateEvent(FGMacOSXInputDevice *device, double dt, int modif } AxisElement::AxisElement(CFDictionaryRef element, long page, long usage) : - HIDElement(element, page, usage), dead_band(0.00), saturate(1.0) + HIDElement(element, page, usage), dead_band(0.00) { min = GetHIDElementLongValue(element, kIOHIDElementMinKey); max = GetHIDElementLongValue(element, kIOHIDElementMaxKey); diff --git a/src/Input/FGMacOSXEventInput.hxx b/src/Input/FGMacOSXEventInput.hxx index 07e16ae13..49f059d56 100644 --- a/src/Input/FGMacOSXEventInput.hxx +++ b/src/Input/FGMacOSXEventInput.hxx @@ -119,7 +119,6 @@ private: long min; long max; float dead_band; - float saturate; long center; bool isRelative; bool isWrapping; diff --git a/src/Instrumentation/HUD/HUD_private.hxx b/src/Instrumentation/HUD/HUD_private.hxx index ee787b6a7..9f42dcd45 100644 --- a/src/Instrumentation/HUD/HUD_private.hxx +++ b/src/Instrumentation/HUD/HUD_private.hxx @@ -181,9 +181,7 @@ private: Format _mode; std::string _format; int _halign; // HUDText alignment - int _blink; bool _box; - float _text_y; float _pointer_width; float _pointer_length; diff --git a/src/Instrumentation/slip_skid_ball.hxx b/src/Instrumentation/slip_skid_ball.hxx index 728717b22..87b691e3f 100644 --- a/src/Instrumentation/slip_skid_ball.hxx +++ b/src/Instrumentation/slip_skid_ball.hxx @@ -41,9 +41,6 @@ public: virtual void update (double dt); private: - - double _last_pos; - std::string _name; int _num; diff --git a/src/Instrumentation/tacan.hxx b/src/Instrumentation/tacan.hxx index 48ca925f2..5a38376a8 100644 --- a/src/Instrumentation/tacan.hxx +++ b/src/Instrumentation/tacan.hxx @@ -93,14 +93,12 @@ private: SGVec3d _transmitter; SGGeod _transmitter_pos; double _transmitter_range_nm; - double _transmitter_bearing_deg; double _transmitter_bias; std::string _transmitter_name; std::string _transmitter_ident; SGGeod _mobilePos; double _mobile_range_nm; - double _mobile_bearing_deg; double _mobile_bias; std::string _mobile_name; std::string _mobile_ident; diff --git a/src/Instrumentation/tcas.cxx b/src/Instrumentation/tcas.cxx index 12047c65e..519880efe 100644 --- a/src/Instrumentation/tcas.cxx +++ b/src/Instrumentation/tcas.cxx @@ -112,11 +112,6 @@ using std::string; # include #endif -#include
-#include
-#include "instrument_mgr.hxx" -#include "tcas.hxx" - /////////////////////////////////////////////////////////////////////////////// // debug switches ///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -127,6 +122,11 @@ using std::string; //#define FEATURE_TCAS_DEBUG_ADV_GENERATOR //#define FEATURE_TCAS_DEBUG_PROPERTIES +#include
+#include
+#include "instrument_mgr.hxx" +#include "tcas.hxx" + /////////////////////////////////////////////////////////////////////////////// // constants ////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// @@ -532,9 +532,11 @@ TCAS::AdvisoryCoordinator::update(int mode) TCAS::ThreatDetector::ThreatDetector(TCAS* _tcas) : tcas(_tcas), - checkCount(0), pAlarmThresholds(&sensitivityLevels[0]) { +#ifdef FEATURE_TCAS_DEBUG_THREAT_DETECTOR + checkCount = 0; +#endif self.radarAltFt = 0.0; unitTest(); } diff --git a/src/Instrumentation/tcas.hxx b/src/Instrumentation/tcas.hxx index 89d929114..849a58f5d 100644 --- a/src/Instrumentation/tcas.hxx +++ b/src/Instrumentation/tcas.hxx @@ -342,8 +342,10 @@ class TCAS : public SGSubsystem static const SensitivityLevel sensitivityLevels[]; TCAS* tcas; +#ifdef FEATURE_TCAS_DEBUG_THREAT_DETECTOR int checkCount; - +#endif // of FEATURE_TCAS_DEBUG_THREAT_DETECTOR + SGPropertyNode_ptr nodeLat; SGPropertyNode_ptr nodeLon; SGPropertyNode_ptr nodePressureAlt;