Small tweaks to class initialization.

This commit is contained in:
curt
2001-12-28 23:37:34 +00:00
parent 5bab565cfe
commit 45d3e19c38
3 changed files with 16 additions and 6 deletions

View File

@@ -32,10 +32,14 @@
#endif
// Constructor
SGStarData::SGStarData() {
SGStarData::SGStarData() :
nstars(0)
{
}
SGStarData::SGStarData( SGPath path ) {
SGStarData::SGStarData( SGPath path ) :
nstars(0)
{
data_path = SGPath( path );
load();
}

View File

@@ -53,13 +53,16 @@ static string fix_path( const string path ) {
// default constructor
SGPath::SGPath() {
path = "";
SGPath::SGPath() :
path("")
{
}
// create a path based on "path"
SGPath::SGPath( const string p ) {
SGPath::SGPath( const string p ) :
path("")
{
set( p );
}

View File

@@ -102,7 +102,10 @@ public:
inline long get_usec() const { return usec; }
};
inline SGTimeStamp::SGTimeStamp() {
inline SGTimeStamp::SGTimeStamp() :
seconds(0),
usec(0)
{
}
inline SGTimeStamp::SGTimeStamp( const long s, const long u ) {