From 2ec4b6ecc236fec5b6b21f004c7cb7f9a0ba3cb3 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 21 Jun 2013 18:39:16 +0100 Subject: [PATCH] Fix warnings identified by updated XCode. Mostly unused private vars, for various reasons. --- src/Airports/groundnetwork.hxx | 1 - src/Autopilot/route_mgr.cxx | 2 +- src/Navaids/markerbeacon.cxx | 9 +++++++++ src/Navaids/markerbeacon.hxx | 4 +++- src/Network/joyclient.hxx | 1 - src/Network/jsclient.hxx | 1 - src/Network/lfsglass.hxx | 1 - src/Network/native.hxx | 1 - src/Network/native_ctrls.hxx | 2 -- src/Network/native_fdm.hxx | 1 - src/Network/native_gui.hxx | 1 - 11 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/Airports/groundnetwork.hxx b/src/Airports/groundnetwork.hxx index 342cdbe8d..76eaa899e 100644 --- a/src/Airports/groundnetwork.hxx +++ b/src/Airports/groundnetwork.hxx @@ -173,7 +173,6 @@ private: TrafficVector activeTraffic; TrafficVectorIterator currTraffic; - bool foundRoute; double totalDistance, maxDistance; FGTowerController *towerController; FGAirport *parent; diff --git a/src/Autopilot/route_mgr.cxx b/src/Autopilot/route_mgr.cxx index b1259f791..71dddb30b 100644 --- a/src/Autopilot/route_mgr.cxx +++ b/src/Autopilot/route_mgr.cxx @@ -234,7 +234,7 @@ FGRouteMgr::~FGRouteMgr() input->removeChangeListener(listener); delete listener; - SGCommandMgr* cmdMgr = SGCommandMgr::instance(); + //SGCommandMgr* cmdMgr = SGCommandMgr::instance(); //cmdMgr->removeCommand("define-user-waypoint"); } diff --git a/src/Navaids/markerbeacon.cxx b/src/Navaids/markerbeacon.cxx index 769eda40a..82726e8e1 100644 --- a/src/Navaids/markerbeacon.cxx +++ b/src/Navaids/markerbeacon.cxx @@ -25,6 +25,8 @@ #endif #include +#include +#include using std::string; @@ -34,3 +36,10 @@ FGMarkerBeaconRecord::FGMarkerBeaconRecord(PositionedID aGuid, Type aTy, _runway(aRunway) { } + +FGRunwayRef FGMarkerBeaconRecord::runway() const +{ + FGPositioned* p = flightgear::NavDataCache::instance()->loadById(_runway); + assert(p->type() == FGPositioned::RUNWAY); + return static_cast(p); +} \ No newline at end of file diff --git a/src/Navaids/markerbeacon.hxx b/src/Navaids/markerbeacon.hxx index 8ac57dff2..23c88a0de 100644 --- a/src/Navaids/markerbeacon.hxx +++ b/src/Navaids/markerbeacon.hxx @@ -27,13 +27,15 @@ #include #include "positioned.hxx" - +#include class FGMarkerBeaconRecord : public FGPositioned { public: FGMarkerBeaconRecord(PositionedID aGuid, Type aTy, PositionedID aRunway, const SGGeod& aPos); + + FGRunwayRef runway() const; private: PositionedID _runway; diff --git a/src/Network/joyclient.hxx b/src/Network/joyclient.hxx index 818081e1b..47a73667b 100644 --- a/src/Network/joyclient.hxx +++ b/src/Network/joyclient.hxx @@ -39,7 +39,6 @@ using std::string; class FGJoyClient : public FGProtocol { char buf[256]; - int length; public: diff --git a/src/Network/jsclient.hxx b/src/Network/jsclient.hxx index a25c623e9..695d98703 100644 --- a/src/Network/jsclient.hxx +++ b/src/Network/jsclient.hxx @@ -40,7 +40,6 @@ using std::string; class FGJsClient : public FGProtocol { char buf[256]; - int length; double axis[4]; SGPropertyNode_ptr axisdef[4]; string axisdefstr[4]; diff --git a/src/Network/lfsglass.hxx b/src/Network/lfsglass.hxx index cb5ff9110..2f102cdef 100644 --- a/src/Network/lfsglass.hxx +++ b/src/Network/lfsglass.hxx @@ -38,7 +38,6 @@ class FGLFSGlass : public FGProtocol { FGLFSGlassData buf; - int length; // Environment SGPropertyNode_ptr press_node; diff --git a/src/Network/native.hxx b/src/Network/native.hxx index 66e00830d..254ef1391 100644 --- a/src/Network/native.hxx +++ b/src/Network/native.hxx @@ -35,7 +35,6 @@ class FGNative : public FGProtocol { FGInterface buf; - int length; public: diff --git a/src/Network/native_ctrls.hxx b/src/Network/native_ctrls.hxx index fe90e79d9..4e4afe579 100644 --- a/src/Network/native_ctrls.hxx +++ b/src/Network/native_ctrls.hxx @@ -40,8 +40,6 @@ class FGNativeCtrls : public FGProtocol { FGNetCtrls net_ctrls; FGControls ctrls; - int length; - public: FGNativeCtrls(); diff --git a/src/Network/native_fdm.hxx b/src/Network/native_fdm.hxx index 4a21864c7..3cf5b6e07 100644 --- a/src/Network/native_fdm.hxx +++ b/src/Network/native_fdm.hxx @@ -36,7 +36,6 @@ class FGNativeFDM : public FGProtocol { FGNetFDM buf; - int length; public: diff --git a/src/Network/native_gui.hxx b/src/Network/native_gui.hxx index 299a40628..a32b1f740 100644 --- a/src/Network/native_gui.hxx +++ b/src/Network/native_gui.hxx @@ -33,7 +33,6 @@ class FGNativeGUI : public FGProtocol { FGNetGUI buf; - int length; public: -- 2.39.5