@@ -741,7 +741,7 @@ void InitParameterInteraction()
741741 LogPrintf (" %s: parameter interaction: -whitebind set -> setting -listen=1\n " , __func__);
742742 }
743743
744- if (gArgs .IsArgSet (" -connect" ) && gArgs . GetArgs ( " -connect " ). size () > 0 ) {
744+ if (gArgs .IsArgSet (" -connect" )) {
745745 // when only connecting to trusted nodes, do not seed via DNS, or listen by default
746746 if (SoftSetBoolArg (" -dnsseed" , false ))
747747 LogPrintf (" %s: parameter interaction: -connect set -> setting -dnsseed=0\n " , __func__);
@@ -911,9 +911,9 @@ bool AppInitParameterInteraction()
911911 InitWarning (strprintf (_ (" Reducing -maxconnections from %d to %d, because of system limitations." ), nUserMaxConnections, nMaxConnections));
912912
913913 // ********************************************************* Step 3: parameter-to-internal-flags
914- if (gArgs .IsArgSet (" -debug" ) > 0 ) {
914+ if (gArgs .IsArgSet (" -debug" )) {
915915 // Special-case: if -debug=0/-nodebug is set, turn off debugging messages
916- const std::vector<std::string>& categories = gArgs .GetArgs (" -debug" );
916+ const std::vector<std::string> categories = gArgs .GetArgs (" -debug" );
917917
918918 if (find (categories.begin (), categories.end (), std::string (" 0" )) == categories.end ()) {
919919 for (const auto & cat : categories) {
@@ -928,9 +928,8 @@ bool AppInitParameterInteraction()
928928 }
929929
930930 // Now remove the logging categories which were explicitly excluded
931- if (gArgs .IsArgSet (" -debugexclude" ) > 0 ) {
932- const std::vector<std::string>& excludedCategories = gArgs .GetArgs (" -debugexclude" );
933- for (const auto & cat : excludedCategories) {
931+ if (gArgs .IsArgSet (" -debugexclude" )) {
932+ for (const std::string& cat : gArgs .GetArgs (" -debugexclude" )) {
934933 uint32_t flag = 0 ;
935934 if (!GetLogCategory (&flag, &cat)) {
936935 InitWarning (strprintf (_ (" Unsupported logging category %s=%s." ), " -debugexclude" , cat));
@@ -1105,10 +1104,9 @@ bool AppInitParameterInteraction()
11051104 if (!chainparams.MineBlocksOnDemand ()) {
11061105 return InitError (" BIP9 parameters may only be overridden on regtest." );
11071106 }
1108- const std::vector<std::string>& deployments = gArgs .GetArgs (" -bip9params" );
1109- for (auto i : deployments) {
1107+ for (const std::string& strDeployment : gArgs .GetArgs (" -bip9params" )) {
11101108 std::vector<std::string> vDeploymentParams;
1111- boost::split (vDeploymentParams, i , boost::is_any_of (" :" ));
1109+ boost::split (vDeploymentParams, strDeployment , boost::is_any_of (" :" ));
11121110 if (vDeploymentParams.size () != 3 ) {
11131111 return InitError (" BIP9 parameters malformed, expecting deployment:start:end" );
11141112 }
0 commit comments