1
0
Fork 0

warning fixes

This commit is contained in:
torsten 2009-08-23 17:58:01 +00:00 committed by Tim Moore
parent 1b08957f2a
commit 8d98e4cd49
4 changed files with 12 additions and 10 deletions

View file

@ -80,7 +80,7 @@ HUD::Label::Label(HUD *hud, const SGPropertyNode *n, float x, float y) :
void HUD::Label::draw(void) void HUD::Label::draw(void)
{ {
if (!(_mode == NONE || _input.isValid() && blink())) if (!(_mode == NONE || (_input.isValid() && blink())))
return; return;
if (_box) { if (_box) {

View file

@ -478,9 +478,9 @@ void HUD::Ladder::draw(void)
else if (i == -90 && _nadir) else if (i == -90 && _nadir)
draw_nadir(0.0, y); draw_nadir(0.0, y);
if (_zenith && i > 85 || i > 90) if ((_zenith && i > 85) || i > 90)
continue; continue;
if (_nadir && i < -85 || i < -90) if ((_nadir && i < -85) || i < -90)
continue; continue;
lo.x = -half_span; lo.x = -half_span;

View file

@ -183,7 +183,7 @@ void HUD::Runway::get_rwy_points(sgdVec3 *_points3d)
double alt = current_aircraft.fdm_state->get_Runway_altitude() * SG_FEET_TO_METER; double alt = current_aircraft.fdm_state->get_Runway_altitude() * SG_FEET_TO_METER;
double length = _runway->lengthM() * 0.5; double length = _runway->lengthM() * 0.5;
double width = _runway->widthM() * 0.5; double width = _runway->widthM() * 0.5;
double frontLat, frontLon, backLat, backLon,az, tempLat, tempLon; double frontLat = 0.0, frontLon = 0.0, backLat = 0.0, backLon = 0.0, az = 0.0, tempLat = 0.0, tempLon = 0.0;
geo_direct_wgs_84(alt, _runway->latitude(), _runway->longitude(), _runway->headingDeg(), length, &backLat, &backLon, &az); geo_direct_wgs_84(alt, _runway->latitude(), _runway->longitude(), _runway->headingDeg(), length, &backLat, &backLon, &az);
sgGeodToCart(backLat * SG_DEGREES_TO_RADIANS, backLon * SG_DEGREES_TO_RADIANS, alt, _points3d[4]); sgGeodToCart(backLat * SG_DEGREES_TO_RADIANS, backLon * SG_DEGREES_TO_RADIANS, alt, _points3d[4]);

View file

@ -243,11 +243,12 @@ void HUD::Tape::draw_vertical(float value)
for (int i = 0; ; i++) { for (int i = 0; ; i++) {
float v = vstart + i * _minor_divs; float v = vstart + i * _minor_divs;
if (!_modulo) if (!_modulo) {
if (v < _input.min()) if (v < _input.min())
continue; continue;
else if (v > _input.max()) else if (v > _input.max())
break; break;
}
float y = _y + (v - vmin) * factor(); float y = _y + (v - vmin) * factor();
@ -335,8 +336,8 @@ void HUD::Tape::draw_vertical(float value)
continue; continue;
if (_label_gap == 0.0 if (_label_gap == 0.0
|| b < _center_y - _label_gap && t < _center_y - _label_gap || (b < _center_y - _label_gap && t < _center_y - _label_gap)
|| b > _center_y + _label_gap && t > _center_y + _label_gap) { || (b > _center_y + _label_gap && t > _center_y + _label_gap)) {
draw_text(x, y, s); draw_text(x, y, s);
} }
} }
@ -451,11 +452,12 @@ void HUD::Tape::draw_horizontal(float value)
for (int i = 0; ; i++) { for (int i = 0; ; i++) {
float v = vstart + i * _minor_divs; float v = vstart + i * _minor_divs;
if (!_modulo) if (!_modulo) {
if (v < _input.min()) if (v < _input.min())
continue; continue;
else if (v > _input.max()) else if (v > _input.max())
break; break;
}
float x = _x + (v - vmin) * factor(); float x = _x + (v - vmin) * factor();
@ -520,8 +522,8 @@ void HUD::Tape::draw_horizontal(float value)
continue; continue;
if (_label_gap == 0.0 if (_label_gap == 0.0
|| l < _center_x - _label_gap && r < _center_x - _label_gap || (l < _center_x - _label_gap && r < _center_x - _label_gap)
|| l > _center_x + _label_gap && r > _center_x + _label_gap) { || (l > _center_x + _label_gap && r > _center_x + _label_gap)) {
draw_text(x, y, s); draw_text(x, y, s);
} }
} }