ephemeris.cxx ephemeris.hxx stardata.cxx:
one must not do changes just before checkin,
one most not do changes just before checkin,
[ last message repeated 100 times ]
// Constructor
-SGEphemeris::SGEphemeris( const string &path ) {
+SGEphemeris::SGEphemeris( const std::string &path ) {
our_sun = new Star;
moon = new MoonPos;
mercury = new Mercury;
#ifndef _EPHEMERIS_HXX
#define _EPHEMERIS_HXX
+#include <string>
#include <simgear/ephemeris/star.hxx>
#include <simgear/ephemeris/moonpos.hxx>
#include <simgear/ephemeris/stardata.hxx>
#include <simgear/math/SGMath.hxx>
+#include <simgear/misc/sg_path.hxx>
/** Ephemeris class
* calling the constructor you need to provide a path pointing to
* your star database file.
* @param path path to your star database */
- SGEphemeris( const string &path );
+ SGEphemeris( const std::string &path );
/** Destructor */
~SGEphemeris( void );
_stars.clear();
// build the full path name to the stars data base file
- path.append( "stars" );
- SG_LOG( SG_ASTRO, SG_INFO, " Loading stars from " << path.str() );
+ SGPath tmp = path;
+ tmp.append( "stars" );
+ SG_LOG( SG_ASTRO, SG_INFO, " Loading stars from " << tmp.str() );
- sg_gzifstream in( path.str() );
+ sg_gzifstream in( tmp.str() );
if ( ! in.is_open() ) {
SG_LOG( SG_ASTRO, SG_ALERT, "Cannot open star file: "
- << path.str() );
+ << tmp.str() );
return false;
}