1
0
Fork 0

Fix a few warnings while I'm in there. Melchior poitned out that my default

configure-generated Makefiles don't include -Wall and a few issues had crept
into the code.
This commit is contained in:
andy 2006-08-08 18:23:20 +00:00
parent 90e7c4ec43
commit e26481cf0a
5 changed files with 6 additions and 5 deletions

View file

@ -89,6 +89,8 @@ public:
// of body state vs. the environment can happen here (crashes,
// etc...).
virtual void newState(State* state) = 0;
virtual ~BodyEnvironment() {} // #!$!?! gcc warning...
};
}; // namespace yasim

View file

@ -35,6 +35,7 @@ public:
virtual float getTorque() = 0;
virtual float getFuelFlow() = 0;
virtual ~Engine() {}
protected:
float _throttle;
bool _starter; // true=engaged, false=disengaged

View file

@ -480,7 +480,7 @@ void FGFDM::setOutputProperties(float dt)
int j = 0;
float f;
char b[256];
while(j = r->getValueforFGSet(j, b, &f))
while((j = r->getValueforFGSet(j, b, &f)))
if(b[0]) fgSetFloat(b,f);
for(j=0; j < r->numRotorparts(); j++) {

View file

@ -477,7 +477,6 @@ void Model::calcForces(State* s)
// The arrester hook
if(_hook) {
float v[3], rot[3], glvel[3], ground[3];
_hook->calcForce(_ground_cb, &_body, s, lv, lrot);
float force[3], contact[3];
_hook->getForce(force, contact);
@ -486,7 +485,6 @@ void Model::calcForces(State* s)
// The launchbar/holdback
if(_launchbar) {
float v[3], rot[3], glvel[3], ground[3];
_launchbar->calcForce(_ground_cb, &_body, s, lv, lrot);
float forcelb[3], contactlb[3], forcehb[3], contacthb[3];
_launchbar->getForce(forcelb, contactlb, forcehb, contacthb);

View file

@ -30,8 +30,8 @@ static const float KTS2MPS = 0.514444444444;
// G's). You can use this in gnuplot like so (assuming the output is
// in a file named "dat":
//
// plot "dat" using 1:2 with lines title 'lift', \
// "dat" using 1:3 with lines title 'drag', \
// plot "dat" using 1:2 with lines title 'lift', \
// "dat" using 1:3 with lines title 'drag', \
// "dat" using 1:4 with lines title 'LD'
//
void yasim_graph(Airplane* a, float alt, float kts)