diff options
author | Jorge Timón <jtimon@jtimon.cc> | 2017-03-29 17:51:41 +0200 |
---|---|---|
committer | Jorge Timón <jtimon@jtimon.cc> | 2017-06-27 02:54:19 +0200 |
commit | 506b700dcb5dd5a7c1d8ffa7c77043a93e4e10de (patch) | |
tree | 7f46aa37dccf2c77cb897c00afbede86e40a7f42 /src/net.cpp | |
parent | 234ffc677ee58591b139695bf92bbd6f504ee91a (diff) |
Util: Remove redundant calls to gArgs.IsArgSet()
Return empty std::vector<std::string> with ArgsManager::GetArgs if
nothing is set for that string
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/net.cpp b/src/net.cpp index 91a62626a2..301cf58b87 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1677,7 +1677,7 @@ void CConnman::ProcessOneShot() void CConnman::ThreadOpenConnections() { // Connect to specific addresses - if (gArgs.IsArgSet("-connect") && gArgs.GetArgs("-connect").size() > 0) + if (gArgs.IsArgSet("-connect")) { for (int64_t nLoop = 0;; nLoop++) { @@ -1903,8 +1903,7 @@ void CConnman::ThreadOpenAddedConnections() { { LOCK(cs_vAddedNodes); - if (gArgs.IsArgSet("-addnode")) - vAddedNodes = gArgs.GetArgs("-addnode"); + vAddedNodes = gArgs.GetArgs("-addnode"); } while (true) |