From d3bce70e862c9f8a997aa36f0d1874542a8cf1fb Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 14 Aug 2012 16:00:03 -0700 Subject: [PATCH] Remove Config::init. It's not needed. --- src/Config.cpp | 7 ++----- src/Config.h | 1 - src/main.cpp | 11 +++++------ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/Config.cpp b/src/Config.cpp index ef79cae52a..4e36f39a1b 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -40,11 +40,6 @@ Config theConfig; -void Config::init() -{ - RUN_STANDALONE = false; -} - void Config::setup(const std::string& strConf) { boost::system::error_code ec; @@ -155,6 +150,8 @@ void Config::setup(const std::string& strConf) VALIDATORS_SITE = DEFAULT_VALIDATORS_SITE; + RUN_STANDALONE = false; + load(); } diff --git a/src/Config.h b/src/Config.h index a7828da7b6..89fb60b3de 100644 --- a/src/Config.h +++ b/src/Config.h @@ -101,7 +101,6 @@ public: // Client behavior int ACCOUNT_PROBE_MAX; // How far to scan for accounts. - void init(); void setup(const std::string& strConf); void load(); }; diff --git a/src/main.cpp b/src/main.cpp index c78da1e246..4499a2c588 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,7 +84,6 @@ int main(int argc, char* argv[]) int iResult = 0; po::variables_map vm; // Map of options. bool bTest = false; - theConfig.init(); // // Set up option parsing. @@ -144,16 +143,16 @@ int main(int argc, char* argv[]) Log::setMinSeverity(lsTRACE); } - if (vm.count("standalone")) - { - theConfig.RUN_STANDALONE = true; - } - if (!iResult) { theConfig.setup(vm.count("conf") ? vm["conf"].as() : ""); } + if (vm.count("standalone")) + { + theConfig.RUN_STANDALONE = true; + } + if (iResult) { nothing();