diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/configmanagerbase.cpp | 4 | ||||
-rw-r--r-- | src/configmanagerbase.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/configmanagerbase.cpp b/src/configmanagerbase.cpp index 4b94cc6..cf7eb3e 100644 --- a/src/configmanagerbase.cpp +++ b/src/configmanagerbase.cpp | |||
@@ -17,13 +17,13 @@ void ConfigManagerBase::addSearchPath( const std::string &sPath ) | |||
17 | lSearchPath.push_back( sPath ); | 17 | lSearchPath.push_back( sPath ); |
18 | } | 18 | } |
19 | 19 | ||
20 | void ConfigManagerBase::loadConfig( const char *lpProfile ) | 20 | void ConfigManagerBase::loadConfig( const std::string &sFileName, const char *lpProfile ) |
21 | { | 21 | { |
22 | // Try a few locations... | 22 | // Try a few locations... |
23 | std::list<std::string>::const_iterator i; | 23 | std::list<std::string>::const_iterator i; |
24 | for( i = lSearchPath.begin(); i != lSearchPath.end(); i++ ) | 24 | for( i = lSearchPath.begin(); i != lSearchPath.end(); i++ ) |
25 | { | 25 | { |
26 | if( parseConfig( (*i).c_str(), lpProfile ) ) | 26 | if( parseConfig( (*i+sFileName).c_str(), lpProfile ) ) |
27 | { | 27 | { |
28 | break; | 28 | break; |
29 | } | 29 | } |
diff --git a/src/configmanagerbase.h b/src/configmanagerbase.h index b60c73a..11a9a8e 100644 --- a/src/configmanagerbase.h +++ b/src/configmanagerbase.h | |||
@@ -12,7 +12,7 @@ public: | |||
12 | 12 | ||
13 | public: | 13 | public: |
14 | void addSearchPath( const std::string &sPath ); | 14 | void addSearchPath( const std::string &sPath ); |
15 | void loadConfig( const char *lpProfile="default" ); | 15 | void loadConfig( const std::string &sFileName, const char *lpProfile="default" ); |
16 | 16 | ||
17 | private: | 17 | private: |
18 | bool parseConfig( const char *lpFileName, const char *lpProfile ); | 18 | bool parseConfig( const char *lpFileName, const char *lpProfile ); |