Minor pointer safety and compiler warning issues.
This commit is contained in:
parent
16d73f4012
commit
e5b81a8bb6
4 changed files with 20 additions and 7 deletions
|
@ -74,6 +74,8 @@ FGControls::FGControls() :
|
|||
mode( 0 ),
|
||||
dump( false ),
|
||||
outflow_valve( 0.0 ),
|
||||
landing_lights( false ),
|
||||
turn_off_lights( false ),
|
||||
taxi_light( false ),
|
||||
logo_lights( false ),
|
||||
nav_lights( false ),
|
||||
|
@ -87,6 +89,7 @@ FGControls::FGControls() :
|
|||
release_ALL( false ),
|
||||
vertical_adjust( 0.0 ),
|
||||
fore_aft_adjust( 0.0 ),
|
||||
cmd_selector_valve( 0 ),
|
||||
off_start_run( 0 ),
|
||||
APU_fire_switch( false ),
|
||||
autothrottle_arm( false ),
|
||||
|
@ -166,6 +169,8 @@ void FGControls::reset_all()
|
|||
|
||||
// Destructor
|
||||
FGControls::~FGControls() {
|
||||
if (globals)
|
||||
globals->set_controls( NULL );
|
||||
}
|
||||
|
||||
|
||||
|
@ -651,6 +656,9 @@ void
|
|||
FGControls::update (double dt)
|
||||
{
|
||||
SG_UNUSED(dt);
|
||||
|
||||
// nothing here, don't call again
|
||||
suspend();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -60,7 +60,7 @@ void FGAirportDynamicsXMLLoader::endXML () {
|
|||
void FGAirportDynamicsXMLLoader::startParking(const XMLAttributes &atts)
|
||||
{
|
||||
string type;
|
||||
int index;
|
||||
int index = 0;
|
||||
string gateName, gateNumber;
|
||||
string lat, lon;
|
||||
double heading = 0.0;
|
||||
|
@ -108,10 +108,10 @@ void FGAirportDynamicsXMLLoader::startParking(const XMLAttributes &atts)
|
|||
|
||||
void FGAirportDynamicsXMLLoader::startNode(const XMLAttributes &atts)
|
||||
{
|
||||
int index;
|
||||
int index = 0;
|
||||
string lat, lon;
|
||||
bool onRunway;
|
||||
int holdPointType;
|
||||
bool onRunway = false;
|
||||
int holdPointType = 0;
|
||||
|
||||
for (int i = 0; i < atts.size() ; i++)
|
||||
{
|
||||
|
@ -147,7 +147,7 @@ void FGAirportDynamicsXMLLoader::startNode(const XMLAttributes &atts)
|
|||
|
||||
void FGAirportDynamicsXMLLoader::startArc(const XMLAttributes &atts)
|
||||
{
|
||||
int begin, end;
|
||||
int begin = 0, end = 0;
|
||||
bool isPushBackRoute = false;
|
||||
|
||||
for (int i = 0; i < atts.size() ; i++)
|
||||
|
|
|
@ -31,8 +31,8 @@ void FGTaxiNode::setElevation(double val)
|
|||
|
||||
double FGTaxiNode::getElevationFt(double refelev)
|
||||
{
|
||||
double elevF = elevation();
|
||||
#if 0
|
||||
double elevF = elevation();
|
||||
double elevationEnd = 0;
|
||||
if ((elevF == 0) || (elevF == refelev)) {
|
||||
SGGeod center2 = mPosition;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include <osgViewer/Viewer>
|
||||
|
||||
#include <simgear/constants.h>
|
||||
#include <simgear/sg_inlines.h>
|
||||
#include <simgear/debug/logstream.hxx>
|
||||
#include <simgear/scene/tgdb/userdata.hxx>
|
||||
#include <simgear/scene/material/matlib.hxx>
|
||||
|
@ -249,7 +250,11 @@ void FGScenery::init() {
|
|||
}
|
||||
|
||||
|
||||
void FGScenery::update(double dt) {
|
||||
void FGScenery::update(double dt)
|
||||
{
|
||||
SG_UNUSED(dt);
|
||||
// nothing here, don't call again
|
||||
suspend();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue