]> git.mxchange.org Git - flightgear.git/commitdiff
clang / libc++ fixes for JSBSim
authorJames Turner <zakalawe@mac.com>
Sat, 25 Jan 2014 10:34:19 +0000 (10:34 +0000)
committerJames Turner <zakalawe@mac.com>
Sat, 25 Jan 2014 10:34:19 +0000 (10:34 +0000)
(needs to be upstreamed too)

src/FDM/JSBSim/input_output/string_utilities.h
src/FDM/JSBSim/models/FGSurface.cpp

index d25e258b351beab95ae390405a7ab3bce70e9d98..9bb120b04bdcf3b8a9346b38754e09968379e5e4 100644 (file)
@@ -73,10 +73,14 @@ CLASS DECLARATION
   extern std::string& to_lower(std::string& str);
   extern bool is_number(const std::string& str);
   std::vector <std::string> split(std::string str, char d);
-/* Comment out to_string functions when they are defined already - C++ 11 defines these */
+
+// libc++ has these as built-ins for all C++ language versions
+#if !defined(_LIBCPP_VERSION)
   extern std::string to_string(int);
   extern std::string to_string(double);
   extern std::string to_string(float);
+#endif
+
   extern std::string replace(std::string str, const std::string& old, const std::string& newstr);
 #else
   #include <cctype>
index 70a89fcf62f7d2e22e45468e1d5ae5b91418eb89..88fec297e998246bc93a689844768b18e09e2201 100644 (file)
@@ -64,7 +64,7 @@ FGSurface::FGSurface()
   isSolid = true;
 }
 
-FGSurface::FGSurface(FGFDMExec* fdmex = NULL)
+FGSurface::FGSurface(FGFDMExec* fdmex)
 {
   frictionFactor = 1.0;
   rollingFCoeff = 0.02;