Util: Remove redundant calls to gArgs.IsArgSet()

Return empty std::vector<std::string> with ArgsManager::GetArgs if
nothing is set for that string
This commit is contained in:
Jorge Timón
2017-03-29 17:51:41 +02:00
parent 234ffc677e
commit 506b700dcb
5 changed files with 16 additions and 37 deletions

View File

@@ -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)