1
0
Fork 0

Removed unreachable code

This commit is contained in:
Scott Giese 2020-08-29 11:20:40 -05:00
parent a87d9ca76f
commit 7b914bc5fb
10 changed files with 9 additions and 24 deletions

View file

@ -248,8 +248,6 @@ string ATISEncoder::processTokenToken( SGPropertyNode_ptr token )
}
handler_t h = it->second;
return (this->*h)( token );
token->getStringValue();
}
string ATISEncoder::processIfToken( SGPropertyNode_ptr token )

View file

@ -705,7 +705,6 @@ int FGPropulsion::GetCutoff(void) const
return ((FGTurbine*)Engines[ActiveEngine])->GetCutoff() ? 1 : 0;
case FGEngine::etTurboprop:
return ((FGTurboProp*)Engines[ActiveEngine])->GetCutoff() ? 1 : 0;
break;
default:
break;
}

View file

@ -80,8 +80,6 @@ static double distanceToLineSegment(const QVector2D& p, const QVector2D& a,
const QVector2D proj = a + t * ab;
return (proj - p).length();
}
return 0.0;
}
static double unitLengthAfterMapping(const QTransform& t)

View file

@ -626,8 +626,6 @@ bool LocationController::shouldStartPaused() const
// navaid, start paused
return true;
}
return false;
}
QVariantMap LocationController::saveLocation() const
@ -1151,8 +1149,6 @@ QString LocationController::description() const
return tr("%4 %1 %2 (%3)").arg(navaidType).arg(ident).arg(name).arg(offsetDesc);
}
return tr("No location selected");
}

View file

@ -1685,7 +1685,6 @@ SGVec2d MapWidget::project(const SGGeod& geod) const
SGQuatd orient = SGQuatd::fromLonLat(_projectionCenter);
cartPt = orient.rotateBack(cartPt);
return SGVec2d(cartPt.y(), cartPt.x()) * currentScale();
break;
}
} // of projection mode switch

View file

@ -1140,10 +1140,9 @@ double DCLGPS::GetTimeToWaypoint(const string& id) {
const GPSWaypoint* wp = FindFirstByExactId(id);
if(wp == NULL) return(-1.0);
double distm = GetGreatCircleDistance(_gpsLat, _gpsLon, wp->lat, wp->lon);
delete wp;
delete wp;
return(distm / _groundSpeed_ms);
}
return(-1.0); // Hopefully we never get here!
}
// Returns magnetic great-circle heading

View file

@ -2002,11 +2002,10 @@ public:
} else if ( desc->has_param ) {
SG_LOG( SG_GENERAL, SG_ALERT, "Option '" << desc->option << "' needs a parameter" );
return FG_OPTIONS_ERROR;
} else {
SG_LOG( SG_GENERAL, SG_ALERT, "Option '" << desc->option << "' does not have a parameter" );
return FG_OPTIONS_ERROR;
}
break;
SG_LOG( SG_GENERAL, SG_ALERT, "Option '" << desc->option << "' does not have a parameter" );
return FG_OPTIONS_ERROR;
case OPTION_IGNORE:
break;

View file

@ -523,10 +523,8 @@ bool FGTrafficManager::doDataSync()
}
trafficSyncRequested = false;
return true;
SG_LOG(SG_AI, SG_INFO, "Traffic files sync complete");
}
return true;
}

View file

@ -225,11 +225,9 @@ private:
return button;
} else if (ea.getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_UP) {
return PU_SCROLL_UP_BUTTON;
} else {
return PU_SCROLL_DOWN_BUTTON;
}
return PU_NOBUTTON;
return PU_SCROLL_DOWN_BUTTON;
}
PUICamera* _puiCamera = nullptr;

View file

@ -101,12 +101,13 @@
*/
static FGCroppedTexture_ptr
readTexture (const SGPropertyNode *node) {
SG_LOG(SG_COCKPIT, SG_DEBUG, "Read texture " << node->getName ());
return new FGCroppedTexture (node->getStringValue ("path"),
node->getFloatValue ("x1"),
node->getFloatValue ("y1"),
node->getFloatValue ("x2", 1.0),
node->getFloatValue ("y2", 1.0));
SG_LOG(SG_COCKPIT, SG_DEBUG, "Read texture " << node->getName ());
}
/**