Remove Config::init. It's not needed.

This commit is contained in:
JoelKatz
2012-08-14 16:00:03 -07:00
parent 36fb085114
commit d3bce70e86
3 changed files with 7 additions and 12 deletions

View File

@@ -40,11 +40,6 @@
Config theConfig; Config theConfig;
void Config::init()
{
RUN_STANDALONE = false;
}
void Config::setup(const std::string& strConf) void Config::setup(const std::string& strConf)
{ {
boost::system::error_code ec; boost::system::error_code ec;
@@ -155,6 +150,8 @@ void Config::setup(const std::string& strConf)
VALIDATORS_SITE = DEFAULT_VALIDATORS_SITE; VALIDATORS_SITE = DEFAULT_VALIDATORS_SITE;
RUN_STANDALONE = false;
load(); load();
} }

View File

@@ -101,7 +101,6 @@ public:
// Client behavior // Client behavior
int ACCOUNT_PROBE_MAX; // How far to scan for accounts. int ACCOUNT_PROBE_MAX; // How far to scan for accounts.
void init();
void setup(const std::string& strConf); void setup(const std::string& strConf);
void load(); void load();
}; };

View File

@@ -84,7 +84,6 @@ int main(int argc, char* argv[])
int iResult = 0; int iResult = 0;
po::variables_map vm; // Map of options. po::variables_map vm; // Map of options.
bool bTest = false; bool bTest = false;
theConfig.init();
// //
// Set up option parsing. // Set up option parsing.
@@ -144,16 +143,16 @@ int main(int argc, char* argv[])
Log::setMinSeverity(lsTRACE); Log::setMinSeverity(lsTRACE);
} }
if (vm.count("standalone"))
{
theConfig.RUN_STANDALONE = true;
}
if (!iResult) if (!iResult)
{ {
theConfig.setup(vm.count("conf") ? vm["conf"].as<std::string>() : ""); theConfig.setup(vm.count("conf") ? vm["conf"].as<std::string>() : "");
} }
if (vm.count("standalone"))
{
theConfig.RUN_STANDALONE = true;
}
if (iResult) if (iResult)
{ {
nothing(); nothing();