X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2Fmodelmgr.cxx;h=449c3bedc8ff0ce5598391ea68c186c8d60a90fb;hb=cff6b2034de866df70a2b29feb3383ee8ccbbef6;hp=142d7af4080d95b313853bdbb3c9757330f073e6;hpb=1c5eb0fb3e66c5c3bcc021310c97ea6d208c4b84;p=flightgear.git diff --git a/src/Model/modelmgr.cxx b/src/Model/modelmgr.cxx index 142d7af40..449c3bedc 100644 --- a/src/Model/modelmgr.cxx +++ b/src/Model/modelmgr.cxx @@ -18,8 +18,6 @@ #include #include -#include - #include #include #include @@ -81,7 +79,7 @@ FGModelMgr::add_model (SGPropertyNode * node) << t.getFormattedMessage() << t.getOrigin()); return; } - + Instance * instance = new Instance; SGModelPlacement *model = new SGModelPlacement; instance->model = model; @@ -150,7 +148,7 @@ namespace { double testNan(double val) throw (sg_range_exception) { - if (osg::isNaN(val)) + if (SGMisc::isNaN(val)) throw sg_range_exception("value is nan"); return val; } @@ -161,6 +159,7 @@ struct UpdateFunctor : public std::unary_function { SGModelPlacement* model = instance->model; double lon, lat, elev, roll, pitch, heading; + lon = lat = elev = roll = pitch = heading = 0.0; try { // Optionally set position from properties