]> git.mxchange.org Git - flightgear.git/commitdiff
MSVC (warning) fixes.
authorehofman <ehofman>
Fri, 18 Feb 2005 10:16:30 +0000 (10:16 +0000)
committerehofman <ehofman>
Fri, 18 Feb 2005 10:16:30 +0000 (10:16 +0000)
src/AIModel/AIAircraft.cxx
src/AIModel/AIFlightPlanCreate.cxx
src/Airports/simple.cxx
src/FDM/YASim/Gear.hpp
src/FDM/YASim/Hook.hpp
src/FDM/YASim/Launchbar.hpp
src/Traffic/TrafficMgr.cxx

index da2159b21ed40a3df1fbb25a3fb66353a07f04de..80c0879d32b51ef20c8c020c689012ccaaeb3268 100644 (file)
 #include <string>
 #include <math.h>
 #include <time.h>
+#ifdef _MSC_VER
+#  include <float.h>
+#  define finite _finite
+#endif
 
 SG_USING_STD(string);
 
index f800f52ca9fcdfd0335ea638a018d0a6dabe9301..f5455effe64f5c84aa6b0efcbdfbff69e4b9ce7f 100644 (file)
@@ -18,7 +18,7 @@
  *
  *
  **************************************************************************/
-#include <AIFlightPlan.hxx>
+#include "AIFlightPlan.hxx"
 #include <simgear/math/sg_geodesy.hxx>
 #include <Airports/runways.hxx>
 
index 5c74391b486a05dd64dadd6f901084a76eb2bcf1..6c1e711947b1afd27a50fc429a0ca9630956c269 100644 (file)
 #  include <config.h>
 #endif
 
+#ifdef _MSC_VER
+#  define _USE_MATH_DEFINES
+#endif
 #include <math.h>
+#include <algorithm>
 
 #include <simgear/compiler.h>
 #include <Environment/environment_mgr.hxx>
@@ -45,7 +49,7 @@
 
 #include "simple.hxx"
 
-SG_USING_NAMESPACE(std);
+SG_USING_STD(sort);
 
 /******************************************************************************
  * ScheduleTime
@@ -192,6 +196,7 @@ RunwayGroup& RunwayGroup:: operator= (const RunwayGroup &other)
   choice[0] = other.choice[0];
   choice[1] = other.choice[1];
   nrActive = other.nrActive;
+  return *this;
 }
 
 void RunwayGroup::setActive(string aptId, 
@@ -399,6 +404,7 @@ ScheduleTime *FGRunwayPreference::getSchedule(const char *trafficType)
   if (!(strcmp(trafficType, "mil"))) {
     return &milTimes;
   }
+  return 0;
 }
 
 RunwayGroup *FGRunwayPreference::getGroup(const string groupName)
@@ -620,16 +626,16 @@ FGAirport::FGAirport(const FGAirport& other)
   _elevation = other._elevation;
   _name      = other._name;
   _has_metar = other._has_metar;
-  for (FGParkingVecConstIterator i= other.parkings.begin(); i != other.parkings.end(); i++)
-    parkings.push_back(*(i));
+  for (FGParkingVecConstIterator ip= other.parkings.begin(); ip != other.parkings.end(); ip++)
+    parkings.push_back(*(ip));
   rwyPrefs = other.rwyPrefs;
   lastUpdate = other.lastUpdate;
   
-  stringVecConstIterator i;
-  for (i = other.landing.begin(); i != other.landing.end(); i++)
-    landing.push_back(*i);
-  for (i = other.takeoff.begin(); i != other.takeoff.end(); i++)
-    takeoff.push_back(*i);
+  stringVecConstIterator il;
+  for (il = other.landing.begin(); il != other.landing.end(); il++)
+    landing.push_back(*il);
+  for (il = other.takeoff.begin(); il != other.takeoff.end(); il++)
+    takeoff.push_back(*il);
   lastUpdate = other.lastUpdate;
   for (int i = 0; i < 10; i++)
     {
index dc9a4ed355c3faf582a1523cb579db7cdb2ee5bb..a042d26e57ab9dd47d26321fb108369105d27503 100644 (file)
@@ -4,7 +4,7 @@
 namespace yasim {
 
 class RigidBody;
-class State;
+struct State;
 
 // A landing gear has the following parameters:
 //
index 5917987229bb0b6d7ff44ea58d971f38a8ff4c63..028a866800840b779785df4257d3d504b906c27e 100644 (file)
@@ -5,7 +5,7 @@ namespace yasim {
 
 class Ground;
 class RigidBody;
-class State;
+struct State;
 
 // A landing hook has the following parameters:
 //
index dcdcb8a714c66c76420bc1edb5f01a418cd705a6..06b7bfab75559e74ea0583ef87fbc093a2aca200 100644 (file)
@@ -5,7 +5,7 @@ namespace yasim {
 
 class Ground;
 class RigidBody;
-class State;
+struct State;
 
 // A launchbar has the following parameters:
 //
index cf2fa59801d8e8b5e89c561cf856a2ce01bfb053..b1265bffcea752cce7189f17a0fe5aff387d04c3 100644 (file)
@@ -41,6 +41,7 @@
 
 #include <string>
 #include <vector>
+#include <algorithm>
 
 #include <plib/sg.h>
 
@@ -63,6 +64,7 @@
 
 #include "TrafficMgr.hxx"
 
+SG_USING_STD(sort);
  
 /******************************************************************************
  * TrafficManager