From 34428f5a7c38b42e5860b7365b54e9ef15c441f7 Mon Sep 17 00:00:00 2001 From: Lukasz Gromanowski Date: Tue, 6 Sep 2011 17:59:40 +0200 Subject: [PATCH] Issue #168: Configuration cleanup, part 2 Tabs vs spaces cleanup. Removed unnecessary empty function. Signed-off-by: Lukasz Gromanowski --- components/cfg/configurationmanager.cpp | 50 ++++++++++++------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/components/cfg/configurationmanager.cpp b/components/cfg/configurationmanager.cpp index 9b4aa5a26..0998debee 100644 --- a/components/cfg/configurationmanager.cpp +++ b/components/cfg/configurationmanager.cpp @@ -15,38 +15,34 @@ static const char* const pluginsCfgFile = "plugins.cfg"; ConfigurationManager::ConfigurationManager() : mPath("openmw") { - /** - * According to task #168 plugins.cfg file shall be located in global - * configuration path or in runtime configuration path. - */ - mPluginsCfgPath = mPath.getGlobalConfigPath() / pluginsCfgFile; - if (!boost::filesystem::is_regular_file(mPluginsCfgPath)) - { - mPluginsCfgPath = mPath.getRuntimeConfigPath() / pluginsCfgFile; - if (!boost::filesystem::is_regular_file(mPluginsCfgPath)) - { - std::cerr << "Failed to find " << pluginsCfgFile << " file!" << std::endl; - mPluginsCfgPath.clear(); - } - } + /** + * According to task #168 plugins.cfg file shall be located in global + * configuration path or in runtime configuration path. + */ + mPluginsCfgPath = mPath.getGlobalConfigPath() / pluginsCfgFile; + if (!boost::filesystem::is_regular_file(mPluginsCfgPath)) + { + mPluginsCfgPath = mPath.getRuntimeConfigPath() / pluginsCfgFile; + if (!boost::filesystem::is_regular_file(mPluginsCfgPath)) + { + std::cerr << "Failed to find " << pluginsCfgFile << " file!" << std::endl; + mPluginsCfgPath.clear(); + } + } - /** - * According to task #168 ogre.cfg file shall be located only - * in user configuration path. - */ - mOgreCfgPath = mPath.getLocalConfigPath() / ogreCfgFile; + /** + * According to task #168 ogre.cfg file shall be located only + * in user configuration path. + */ + mOgreCfgPath = mPath.getLocalConfigPath() / ogreCfgFile; - mLogPath = mPath.getLocalConfigPath(); + mLogPath = mPath.getLocalConfigPath(); } ConfigurationManager::~ConfigurationManager() { } -void setupPath(const char* const cfgFile, boost::filesystem::path& path) -{ -} - void ConfigurationManager::readConfiguration(boost::program_options::variables_map& variables, boost::program_options::options_description& description) { @@ -145,17 +141,17 @@ void ConfigurationManager::setRuntimeDataPath(const boost::filesystem::path& new const boost::filesystem::path& ConfigurationManager::getOgreConfigPath() const { - return mOgreCfgPath; + return mOgreCfgPath; } const boost::filesystem::path& ConfigurationManager::getPluginsConfigPath() const { - return mPluginsCfgPath; + return mPluginsCfgPath; } const boost::filesystem::path& ConfigurationManager::getLogPath() const { - return mLogPath; + return mLogPath; } } /* namespace Cfg */