1
0
Fork 0

Compiler warning fixes and small updates

This commit is contained in:
ehofman 2003-03-19 17:46:52 +00:00
parent cb8b72744c
commit 01be2ed8e4
6 changed files with 21 additions and 20 deletions

View file

@ -35,7 +35,7 @@
#include <string> #include <string>
SG_USING_STD(string); SG_USING_STD(string);
typedef enum PatternLeg { enum PatternLeg {
TAKEOFF_ROLL, TAKEOFF_ROLL,
CLIMBOUT, CLIMBOUT,
TURN1, TURN1,
@ -49,20 +49,20 @@ typedef enum PatternLeg {
LANDING_ROLL LANDING_ROLL
}; };
typedef enum TaxiState { enum TaxiState {
TD_INBOUND, TD_INBOUND,
TD_OUTBOUND, TD_OUTBOUND,
TD_NONE TD_NONE
}; };
typedef enum OperatingState { enum OperatingState {
IN_PATTERN, IN_PATTERN,
TAXIING, TAXIING,
PARKED PARKED
}; };
// perhaps we could use an FGRunway instead of this // perhaps we could use an FGRunway instead of this
typedef struct RunwayDetails { struct RunwayDetails {
Point3D threshold_pos; Point3D threshold_pos;
Point3D end1ortho; // ortho projection end1 (the threshold ATM) Point3D end1ortho; // ortho projection end1 (the threshold ATM)
Point3D end2ortho; // ortho projection end2 (the take off end in the current hardwired scheme) Point3D end2ortho; // ortho projection end2 (the take off end in the current hardwired scheme)
@ -74,7 +74,7 @@ typedef struct RunwayDetails {
string rwyID; string rwyID;
}; };
typedef struct StartofDescent { struct StartofDescent {
PatternLeg leg; PatternLeg leg;
double orthopos_x; double orthopos_x;
double orthopos_y; double orthopos_y;

View file

@ -43,12 +43,12 @@ SG_USING_STD(list);
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
// Types for the logical network data structure // Types for the logical network data structure
typedef enum arc_type { enum arc_type {
RUNWAY, RUNWAY,
TAXIWAY TAXIWAY
}; };
typedef enum node_type { enum node_type {
GATE, GATE,
APRON, APRON,
HOLD, HOLD,
@ -70,7 +70,7 @@ enum GateType {
OTHER // ie. anything goes!! OTHER // ie. anything goes!!
}; };
typedef enum network_element_type { enum network_element_type {
NODE, NODE,
ARC ARC
}; };

View file

@ -92,7 +92,7 @@ FGCondition::FGCondition(FGConfigFile* AC_cfg, FGPropertyManager* PropertyManage
else if (AC_cfg->GetValue("LOGIC") == "AND") Logic = eAND; else if (AC_cfg->GetValue("LOGIC") == "AND") Logic = eAND;
AC_cfg->GetNextConfigLine(); AC_cfg->GetNextConfigLine();
while (AC_cfg->GetValue() != "/CONDITION_GROUP") { while (AC_cfg->GetValue() != string("/CONDITION_GROUP")) {
conditions.push_back(*(new FGCondition(AC_cfg, PropertyManager))); conditions.push_back(*(new FGCondition(AC_cfg, PropertyManager)));
} }
isGroup = true; isGroup = true;

View file

@ -115,7 +115,7 @@ FGSwitch::FGSwitch(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
} }
AC_cfg->GetNextConfigLine(); AC_cfg->GetNextConfigLine();
while (AC_cfg->GetValue() != "/TEST") { while (AC_cfg->GetValue() != string("/TEST")) {
current_test->conditions.push_back(*(new FGCondition(AC_cfg, PropertyManager))); current_test->conditions.push_back(*(new FGCondition(AC_cfg, PropertyManager)));
} }
} }

View file

@ -448,6 +448,7 @@ FGInterface::unbind ()
fgUntie("/orientation/pitch-deg"); fgUntie("/orientation/pitch-deg");
fgUntie("/orientation/heading-deg"); fgUntie("/orientation/heading-deg");
fgUntie("/velocities/airspeed-kt"); fgUntie("/velocities/airspeed-kt");
fgUntie("/velocities/mach");
fgUntie("/velocities/speed-north-fps"); fgUntie("/velocities/speed-north-fps");
fgUntie("/velocities/speed-east-fps"); fgUntie("/velocities/speed-east-fps");
fgUntie("/velocities/speed-down-fps"); fgUntie("/velocities/speed-down-fps");

View file

@ -80,56 +80,56 @@ FGSubsystemGroup::FGSubsystemGroup ()
FGSubsystemGroup::~FGSubsystemGroup () FGSubsystemGroup::~FGSubsystemGroup ()
{ {
for (int i = 0; i < _members.size(); i++) for (unsigned int i = 0; i < _members.size(); i++)
delete _members[i]; delete _members[i];
} }
void void
FGSubsystemGroup::init () FGSubsystemGroup::init ()
{ {
for (int i = 0; i < _members.size(); i++) for (unsigned int i = 0; i < _members.size(); i++)
_members[i]->subsystem->init(); _members[i]->subsystem->init();
} }
void void
FGSubsystemGroup::reinit () FGSubsystemGroup::reinit ()
{ {
for (int i = 0; i < _members.size(); i++) for (unsigned int i = 0; i < _members.size(); i++)
_members[i]->subsystem->reinit(); _members[i]->subsystem->reinit();
} }
void void
FGSubsystemGroup::bind () FGSubsystemGroup::bind ()
{ {
for (int i = 0; i < _members.size(); i++) for (unsigned int i = 0; i < _members.size(); i++)
_members[i]->subsystem->bind(); _members[i]->subsystem->bind();
} }
void void
FGSubsystemGroup::unbind () FGSubsystemGroup::unbind ()
{ {
for (int i = 0; i < _members.size(); i++) for (unsigned int i = 0; i < _members.size(); i++)
_members[i]->subsystem->unbind(); _members[i]->subsystem->unbind();
} }
void void
FGSubsystemGroup::update (double delta_time_sec) FGSubsystemGroup::update (double delta_time_sec)
{ {
for (int i = 0; i < _members.size(); i++) for (unsigned int i = 0; i < _members.size(); i++)
_members[i]->update(delta_time_sec); // indirect call _members[i]->update(delta_time_sec); // indirect call
} }
void void
FGSubsystemGroup::suspend () FGSubsystemGroup::suspend ()
{ {
for (int i = 0; i < _members.size(); i++) for (unsigned int i = 0; i < _members.size(); i++)
_members[i]->subsystem->suspend(); _members[i]->subsystem->suspend();
} }
void void
FGSubsystemGroup::resume () FGSubsystemGroup::resume ()
{ {
for (int i = 0; i < _members.size(); i++) for (unsigned int i = 0; i < _members.size(); i++)
_members[i]->subsystem->resume(); _members[i]->subsystem->resume();
} }
@ -164,7 +164,7 @@ FGSubsystemGroup::get_subsystem (const string &name)
void void
FGSubsystemGroup::remove_subsystem (const string &name) FGSubsystemGroup::remove_subsystem (const string &name)
{ {
for (int i = 0; i < _members.size(); i++) { for (unsigned int i = 0; i < _members.size(); i++) {
if (name == _members[i]->name) { if (name == _members[i]->name) {
_members.erase(_members.begin() + i); _members.erase(_members.begin() + i);
return; return;
@ -181,7 +181,7 @@ FGSubsystemGroup::has_subsystem (const string &name) const
FGSubsystemGroup::Member * FGSubsystemGroup::Member *
FGSubsystemGroup::get_member (const string &name, bool create) FGSubsystemGroup::get_member (const string &name, bool create)
{ {
for (int i = 0; i < _members.size(); i++) { for (unsigned int i = 0; i < _members.size(); i++) {
if (_members[i]->name == name) if (_members[i]->name == name)
return _members[i]; return _members[i];
} }