]> git.mxchange.org Git - simgear.git/blobdiff - simgear/ephemeris/ephemeris.cxx
restore some part of the code to prevent an untwanted segmentationf fault.
[simgear.git] / simgear / ephemeris / ephemeris.cxx
index 7f14dd6f8f62dc266df7ec91fd88a1a4aad51a63..a05481bdfde8d1bf938a5ec30d348c02c8b92b07 100644 (file)
@@ -31,7 +31,7 @@
 
 
 // Constructor
-SGEphemeris::SGEphemeris( const string &path ) {
+SGEphemeris::SGEphemeris( const std::string &path ) {
     our_sun = new Star;
     moon = new MoonPos;
     mercury = new Mercury;
@@ -42,9 +42,8 @@ SGEphemeris::SGEphemeris( const string &path ) {
     uranus = new Uranus;
     neptune = new Neptune;
     nplanets = 7;
-    for ( int i = 0; i < nplanets; ++i ) {
-       sgdSetVec3( planets[i].sg(), 0.0, 0.0, 0.0 );
-    }
+    for ( int i = 0; i < nplanets; ++i )
+      planets[i] = SGVec3d::zeros();
     stars = new SGStarData( SGPath(path) );
 }