mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Remove redundant using namespace Fallback
C++ has ADL to find overloads. using namespace does nothing in this case.
This commit is contained in:
parent
87d77a6882
commit
0d5e9ef85f
5 changed files with 8 additions and 14 deletions
|
@ -53,8 +53,6 @@ namespace
|
||||||
|
|
||||||
bpo::options_description makeOptionsDescription()
|
bpo::options_description makeOptionsDescription()
|
||||||
{
|
{
|
||||||
using Fallback::FallbackMap;
|
|
||||||
|
|
||||||
bpo::options_description result;
|
bpo::options_description result;
|
||||||
auto addOption = result.add_options();
|
auto addOption = result.add_options();
|
||||||
addOption("help", "print help message");
|
addOption("help", "print help message");
|
||||||
|
@ -87,7 +85,8 @@ namespace
|
||||||
"\n\twin1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages\n"
|
"\n\twin1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages\n"
|
||||||
"\n\twin1252 - Western European (Latin) alphabet, used by default");
|
"\n\twin1252 - Western European (Latin) alphabet, used by default");
|
||||||
|
|
||||||
addOption("fallback", bpo::value<FallbackMap>()->default_value(FallbackMap(), "")->multitoken()->composing(),
|
addOption("fallback",
|
||||||
|
bpo::value<Fallback::FallbackMap>()->default_value(Fallback::FallbackMap(), "")->multitoken()->composing(),
|
||||||
"fallback values");
|
"fallback values");
|
||||||
|
|
||||||
Files::ConfigurationManager::addCommonOptions(result);
|
Files::ConfigurationManager::addCommonOptions(result);
|
||||||
|
|
|
@ -62,8 +62,6 @@ namespace NavMeshTool
|
||||||
|
|
||||||
bpo::options_description makeOptionsDescription()
|
bpo::options_description makeOptionsDescription()
|
||||||
{
|
{
|
||||||
using Fallback::FallbackMap;
|
|
||||||
|
|
||||||
bpo::options_description result;
|
bpo::options_description result;
|
||||||
auto addOption = result.add_options();
|
auto addOption = result.add_options();
|
||||||
addOption("help", "print help message");
|
addOption("help", "print help message");
|
||||||
|
|
|
@ -38,8 +38,6 @@
|
||||||
|
|
||||||
#include "view/doc/viewmanager.hpp"
|
#include "view/doc/viewmanager.hpp"
|
||||||
|
|
||||||
using namespace Fallback;
|
|
||||||
|
|
||||||
CS::Editor::Editor(int argc, char** argv)
|
CS::Editor::Editor(int argc, char** argv)
|
||||||
: mConfigVariables(readConfiguration())
|
: mConfigVariables(readConfiguration())
|
||||||
, mSettingsState(mCfgMgr)
|
, mSettingsState(mCfgMgr)
|
||||||
|
@ -124,7 +122,10 @@ boost::program_options::variables_map CS::Editor::readConfiguration()
|
||||||
->default_value(std::vector<std::string>(), "fallback-archive")
|
->default_value(std::vector<std::string>(), "fallback-archive")
|
||||||
->multitoken());
|
->multitoken());
|
||||||
addOption("fallback",
|
addOption("fallback",
|
||||||
boost::program_options::value<FallbackMap>()->default_value(FallbackMap(), "")->multitoken()->composing(),
|
boost::program_options::value<Fallback::FallbackMap>()
|
||||||
|
->default_value(Fallback::FallbackMap(), "")
|
||||||
|
->multitoken()
|
||||||
|
->composing(),
|
||||||
"fallback values");
|
"fallback values");
|
||||||
Files::ConfigurationManager::addCommonOptions(desc);
|
Files::ConfigurationManager::addCommonOptions(desc);
|
||||||
|
|
||||||
|
@ -141,7 +142,7 @@ std::pair<Files::PathContainer, std::vector<std::string>> CS::Editor::readConfig
|
||||||
{
|
{
|
||||||
boost::program_options::variables_map& variables = mConfigVariables;
|
boost::program_options::variables_map& variables = mConfigVariables;
|
||||||
|
|
||||||
Fallback::Map::init(variables["fallback"].as<FallbackMap>().mMap);
|
Fallback::Map::init(variables["fallback"].as<Fallback::FallbackMap>().mMap);
|
||||||
|
|
||||||
mEncodingName = variables["encoding"].as<std::string>();
|
mEncodingName = variables["encoding"].as<std::string>();
|
||||||
mDocumentManager.setEncoding(ToUTF8::calculateEncoding(mEncodingName));
|
mDocumentManager.setEncoding(ToUTF8::calculateEncoding(mEncodingName));
|
||||||
|
|
|
@ -28,8 +28,6 @@ extern "C" __declspec(dllexport) DWORD AmdPowerXpressRequestHighPerformance = 0x
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace Fallback;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Parses application command line and calls \ref Cfg::ConfigurationManager
|
* \brief Parses application command line and calls \ref Cfg::ConfigurationManager
|
||||||
* to parse configuration files.
|
* to parse configuration files.
|
||||||
|
@ -152,7 +150,7 @@ bool parseOptions(int argc, char** argv, OMW::Engine& engine, Files::Configurati
|
||||||
engine.setSaveGameFile(variables["load-savegame"].as<Files::MaybeQuotedPath>().u8string());
|
engine.setSaveGameFile(variables["load-savegame"].as<Files::MaybeQuotedPath>().u8string());
|
||||||
|
|
||||||
// other settings
|
// other settings
|
||||||
Fallback::Map::init(variables["fallback"].as<FallbackMap>().mMap);
|
Fallback::Map::init(variables["fallback"].as<Fallback::FallbackMap>().mMap);
|
||||||
engine.setSoundUsage(!variables["no-sound"].as<bool>());
|
engine.setSoundUsage(!variables["no-sound"].as<bool>());
|
||||||
engine.setActivationDistanceOverride(variables["activate-dist"].as<int>());
|
engine.setActivationDistanceOverride(variables["activate-dist"].as<int>());
|
||||||
engine.enableFontExport(variables["export-fonts"].as<bool>());
|
engine.enableFontExport(variables["export-fonts"].as<bool>());
|
||||||
|
|
|
@ -24,8 +24,6 @@ namespace Fallback
|
||||||
};
|
};
|
||||||
|
|
||||||
// Parses and validates a fallback map from boost program_options.
|
// Parses and validates a fallback map from boost program_options.
|
||||||
// Note: for boost to pick up the validate function, you need to pull in the namespace e.g.
|
|
||||||
// by using namespace Fallback;
|
|
||||||
void validate(boost::any& v, std::vector<std::string> const& tokens, FallbackMap*, int);
|
void validate(boost::any& v, std::vector<std::string> const& tokens, FallbackMap*, int);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue