mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Issue #168: Configuration cleanup, part 2
Tabs vs spaces cleanup. Removed unnecessary empty function. Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
parent
b63a2602c3
commit
34428f5a7c
1 changed files with 23 additions and 27 deletions
|
@ -15,38 +15,34 @@ static const char* const pluginsCfgFile = "plugins.cfg";
|
||||||
ConfigurationManager::ConfigurationManager()
|
ConfigurationManager::ConfigurationManager()
|
||||||
: mPath("openmw")
|
: mPath("openmw")
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* According to task #168 plugins.cfg file shall be located in global
|
* According to task #168 plugins.cfg file shall be located in global
|
||||||
* configuration path or in runtime configuration path.
|
* configuration path or in runtime configuration path.
|
||||||
*/
|
*/
|
||||||
mPluginsCfgPath = mPath.getGlobalConfigPath() / pluginsCfgFile;
|
mPluginsCfgPath = mPath.getGlobalConfigPath() / pluginsCfgFile;
|
||||||
if (!boost::filesystem::is_regular_file(mPluginsCfgPath))
|
if (!boost::filesystem::is_regular_file(mPluginsCfgPath))
|
||||||
{
|
{
|
||||||
mPluginsCfgPath = mPath.getRuntimeConfigPath() / pluginsCfgFile;
|
mPluginsCfgPath = mPath.getRuntimeConfigPath() / pluginsCfgFile;
|
||||||
if (!boost::filesystem::is_regular_file(mPluginsCfgPath))
|
if (!boost::filesystem::is_regular_file(mPluginsCfgPath))
|
||||||
{
|
{
|
||||||
std::cerr << "Failed to find " << pluginsCfgFile << " file!" << std::endl;
|
std::cerr << "Failed to find " << pluginsCfgFile << " file!" << std::endl;
|
||||||
mPluginsCfgPath.clear();
|
mPluginsCfgPath.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* According to task #168 ogre.cfg file shall be located only
|
* According to task #168 ogre.cfg file shall be located only
|
||||||
* in user configuration path.
|
* in user configuration path.
|
||||||
*/
|
*/
|
||||||
mOgreCfgPath = mPath.getLocalConfigPath() / ogreCfgFile;
|
mOgreCfgPath = mPath.getLocalConfigPath() / ogreCfgFile;
|
||||||
|
|
||||||
mLogPath = mPath.getLocalConfigPath();
|
mLogPath = mPath.getLocalConfigPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigurationManager::~ConfigurationManager()
|
ConfigurationManager::~ConfigurationManager()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void setupPath(const char* const cfgFile, boost::filesystem::path& path)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigurationManager::readConfiguration(boost::program_options::variables_map& variables,
|
void ConfigurationManager::readConfiguration(boost::program_options::variables_map& variables,
|
||||||
boost::program_options::options_description& description)
|
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
|
const boost::filesystem::path& ConfigurationManager::getOgreConfigPath() const
|
||||||
{
|
{
|
||||||
return mOgreCfgPath;
|
return mOgreCfgPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
const boost::filesystem::path& ConfigurationManager::getPluginsConfigPath() const
|
const boost::filesystem::path& ConfigurationManager::getPluginsConfigPath() const
|
||||||
{
|
{
|
||||||
return mPluginsCfgPath;
|
return mPluginsCfgPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
const boost::filesystem::path& ConfigurationManager::getLogPath() const
|
const boost::filesystem::path& ConfigurationManager::getLogPath() const
|
||||||
{
|
{
|
||||||
return mLogPath;
|
return mLogPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
} /* namespace Cfg */
|
} /* namespace Cfg */
|
||||||
|
|
Loading…
Reference in a new issue