}
last_time = now;
- play_count = ++play_count % NUM_IDENT_SLOTS;
+ play_count++;
+ play_count %= NUM_IDENT_SLOTS;
// Previous ident is out of time; if still playing, cut it off:
_sgr->stop( nav_fx_name );
void fgExitCleanup();
static bool fpeAbort = false;
-static void handleFPE(int);
static void initFPE();
#if defined(HAVE_FEENABLEEXCEPT)
+static void handleFPE(int);
static void
initFPE ()
{
SG_LOG(SG_GENERAL, SG_ALERT, "Floating point interrupt (SIGFPE)");
}
#else
-static void handleFPE(int)
-{
-}
-
static void initFPE()
{
}
int FGAirwayNetwork::findNearestNode(const SGGeod& aPos)
{
double minDist = HUGE_VAL;
- int index;
+ int index = -1;
SGVec3d cart = SGVec3d::fromGeod(aPos);
//cerr << "Lat " << lat << " lon " << lon << endl;
// Check if this aircraft has been released.
FGTrafficManager *tmgr = (FGTrafficManager *) globals->get_subsystem("Traffic Manager");
if (tmgr->isReleased(AIManagerRef)) {
- AIManagerRef = NULL;
+ AIManagerRef = 0;
} else {
return true; // in visual range, let the AIManager handle it
}