From c8042a48f01aaf306e108683e40db4bfaf0bbcaa Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 29 Nov 2016 15:17:34 -0800 Subject: Remove arguments to ParseConfigFile --- src/bitcoind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bitcoind.cpp') diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index ba3ccac61..3dd085628 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -104,7 +104,7 @@ bool AppInit(int argc, char* argv[]) } try { - ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME), mapArgs, mapMultiArgs); + ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)); } catch (const std::exception& e) { fprintf(stderr,"Error reading configuration file: %s\n", e.what()); return false; -- cgit v1.2.3 From 0cf86a6678413aa03e765a7133f048df4001ff4c Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 29 Nov 2016 17:51:30 -0800 Subject: Introduce (and use) an IsArgSet accessor method --- src/bitcoind.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/bitcoind.cpp') diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index 3dd085628..ee27f4122 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -75,11 +75,11 @@ bool AppInit(int argc, char* argv[]) ParseParameters(argc, argv); // Process help and version before taking care about datadir - if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) + if (IsArgSet("-?") || IsArgSet("-h") || IsArgSet("-help") || IsArgSet("-version")) { std::string strUsage = strprintf(_("%s Daemon"), _(PACKAGE_NAME)) + " " + _("version") + " " + FormatFullVersion() + "\n"; - if (mapArgs.count("-version")) + if (IsArgSet("-version")) { strUsage += FormatParagraph(LicenseInfo()); } -- cgit v1.2.3 From 4cd373aea8d20356727f7d65e0bc818beb6523dc Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 29 Nov 2016 18:45:24 -0800 Subject: Un-expose mapArgs from utils.h --- src/bitcoind.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bitcoind.cpp') diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp index ee27f4122..98551ee85 100644 --- a/src/bitcoind.cpp +++ b/src/bitcoind.cpp @@ -99,7 +99,7 @@ bool AppInit(int argc, char* argv[]) { if (!boost::filesystem::is_directory(GetDataDir(false))) { - fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str()); + fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", GetArg("-datadir", "").c_str()); return false; } try -- cgit v1.2.3