diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-07-26 22:07:59 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-07-26 22:07:59 +0000 |
commit | 273e5baec103e402d81004190413b3efd131716b (patch) | |
tree | 24f401fdfc622cf2af37732d99a0224e002d103c /lib/raidfile | |
parent | e915f55a45b63e558d2abeb72726d80555039fea (diff) |
Make RaidFileController::Initialise take a std::string instead of a
char array, in C++ style. (refs #3, merges [1683])
Diffstat (limited to 'lib/raidfile')
-rw-r--r-- | lib/raidfile/RaidFileController.cpp | 10 | ||||
-rw-r--r-- | lib/raidfile/RaidFileController.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/lib/raidfile/RaidFileController.cpp b/lib/raidfile/RaidFileController.cpp index 14469c68..81307103 100644 --- a/lib/raidfile/RaidFileController.cpp +++ b/lib/raidfile/RaidFileController.cpp @@ -59,12 +59,12 @@ RaidFileController::RaidFileController(const RaidFileController &rController) // -------------------------------------------------------------------------- // // Function -// Name: RaidFileController::Initialise(const char *) +// Name: RaidFileController::Initialise(const std::string&) // Purpose: Initialises the system, loading the configuration file. // Created: 2003/07/08 // // -------------------------------------------------------------------------- -void RaidFileController::Initialise(const char *ConfigFilename) +void RaidFileController::Initialise(const std::string& rConfigFilename) { MEMLEAKFINDER_NO_LEAKS; @@ -97,11 +97,13 @@ void RaidFileController::Initialise(const char *ConfigFilename) // Load the configuration std::string err; - std::auto_ptr<Configuration> pconfig = Configuration::LoadAndVerify(ConfigFilename, &verify, err); + std::auto_ptr<Configuration> pconfig = Configuration::LoadAndVerify( + rConfigFilename, &verify, err); if(pconfig.get() == 0 || !err.empty()) { - fprintf(stderr, "RaidFile configuation file errors:\n%s", err.c_str()); + fprintf(stderr, "RaidFile configuation file errors:\n%s", + err.c_str()); THROW_EXCEPTION(RaidFileException, BadConfigFile) } diff --git a/lib/raidfile/RaidFileController.h b/lib/raidfile/RaidFileController.h index 4962d236..783cb055 100644 --- a/lib/raidfile/RaidFileController.h +++ b/lib/raidfile/RaidFileController.h @@ -81,7 +81,8 @@ public: ~RaidFileController(); public: - void Initialise(const char *ConfigFilename = "/etc/box/raidfile.conf"); + void Initialise(const std::string& rConfigFilename = + "/etc/box/raidfile.conf"); int GetNumDiscSets() {return mSetList.size();} // -------------------------------------------------------------------------- |