Changes for the MacOS port contributed by Darrell Walisser.
This commit is contained in:
@@ -78,7 +78,7 @@ string FGBucket::gen_base_path() const {
|
|||||||
|
|
||||||
FGPath path( raw_path );
|
FGPath path( raw_path );
|
||||||
|
|
||||||
return path.get_path();
|
return path.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+21
-2
@@ -51,7 +51,7 @@ FGPath::FGPath() {
|
|||||||
|
|
||||||
// create a path based on "path"
|
// create a path based on "path"
|
||||||
FGPath::FGPath( const string p ) {
|
FGPath::FGPath( const string p ) {
|
||||||
path = fix_path( p );
|
set( p );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -60,7 +60,13 @@ FGPath::~FGPath() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// append to the existing path
|
// set path
|
||||||
|
void FGPath::set( const string p ) {
|
||||||
|
path = fix_path( p );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// append another piece to the existing path
|
||||||
void FGPath::append( const string p ) {
|
void FGPath::append( const string p ) {
|
||||||
string part = fix_path( p );
|
string part = fix_path( p );
|
||||||
|
|
||||||
@@ -73,3 +79,16 @@ void FGPath::append( const string p ) {
|
|||||||
path += part;
|
path += part;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// concatenate a string to the end of the path without inserting a
|
||||||
|
// path separator
|
||||||
|
void FGPath::concat( const string p ) {
|
||||||
|
string part = fix_path( p );
|
||||||
|
|
||||||
|
if ( path.size() == 0 ) {
|
||||||
|
path = part;
|
||||||
|
} else {
|
||||||
|
path += part;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
+10
-3
@@ -60,12 +60,19 @@ public:
|
|||||||
// destructor
|
// destructor
|
||||||
~FGPath();
|
~FGPath();
|
||||||
|
|
||||||
// append to the existing path
|
// set path
|
||||||
|
void set( const string p );
|
||||||
|
|
||||||
|
// append another piece to the existing path
|
||||||
void append( const string p );
|
void append( const string p );
|
||||||
|
|
||||||
|
// concatenate a string to the end of the path without inserting a
|
||||||
|
// path separator
|
||||||
|
void concat( const string p );
|
||||||
|
|
||||||
// get the path string
|
// get the path string
|
||||||
inline string get_path() const { return path; }
|
inline string str() const { return path; }
|
||||||
inline const char *get_path_c_str() { return path.c_str(); }
|
inline const char *c_str() { return path.c_str(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user