Add an 'add(str)' function that adds a search path separator and appends the str.

This commit is contained in:
ehofman 2004-06-07 09:50:32 +00:00
parent 371fc73f24
commit 8390df37ca
2 changed files with 11 additions and 0 deletions

View File

@ -112,6 +112,11 @@ void SGPath::append( const string& p ) {
fix(); fix();
} }
//add a new path component to the existing path string
void SGPath::add( const string& p ) {
append( sgSearchPathSep+p );
}
// concatenate a string to the end of the path without inserting a // concatenate a string to the end of the path without inserting a
// path separator // path separator

View File

@ -79,6 +79,12 @@ public:
* @param p additional path component */ * @param p additional path component */
void append( const string& p ); void append( const string& p );
/**
* Append a new piece to the existing path. Inserts a search path
* separator to the existing path and the new patch component.
* @param p additional path component */
void add( const string& p );
/** /**
* Concatenate a string to the end of the path without inserting a * Concatenate a string to the end of the path without inserting a
* path separator. * path separator.