@@ -741,7 +741,7 @@ void InitParameterInteraction()
741
741
LogPrintf (" %s: parameter interaction: -whitebind set -> setting -listen=1\n " , __func__);
742
742
}
743
743
744
- if (gArgs .IsArgSet (" -connect" ) && gArgs . GetArgs ( " -connect " ). size () > 0 ) {
744
+ if (gArgs .IsArgSet (" -connect" )) {
745
745
// when only connecting to trusted nodes, do not seed via DNS, or listen by default
746
746
if (SoftSetBoolArg (" -dnsseed" , false ))
747
747
LogPrintf (" %s: parameter interaction: -connect set -> setting -dnsseed=0\n " , __func__);
@@ -911,9 +911,9 @@ bool AppInitParameterInteraction()
911
911
InitWarning (strprintf (_ (" Reducing -maxconnections from %d to %d, because of system limitations." ), nUserMaxConnections, nMaxConnections));
912
912
913
913
// ********************************************************* Step 3: parameter-to-internal-flags
914
- if (gArgs .IsArgSet (" -debug" ) > 0 ) {
914
+ if (gArgs .IsArgSet (" -debug" )) {
915
915
// 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" );
917
917
918
918
if (find (categories.begin (), categories.end (), std::string (" 0" )) == categories.end ()) {
919
919
for (const auto & cat : categories) {
@@ -928,9 +928,8 @@ bool AppInitParameterInteraction()
928
928
}
929
929
930
930
// 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" )) {
934
933
uint32_t flag = 0 ;
935
934
if (!GetLogCategory (&flag, &cat)) {
936
935
InitWarning (strprintf (_ (" Unsupported logging category %s=%s." ), " -debugexclude" , cat));
@@ -1105,10 +1104,9 @@ bool AppInitParameterInteraction()
1105
1104
if (!chainparams.MineBlocksOnDemand ()) {
1106
1105
return InitError (" BIP9 parameters may only be overridden on regtest." );
1107
1106
}
1108
- const std::vector<std::string>& deployments = gArgs .GetArgs (" -bip9params" );
1109
- for (auto i : deployments) {
1107
+ for (const std::string& strDeployment : gArgs .GetArgs (" -bip9params" )) {
1110
1108
std::vector<std::string> vDeploymentParams;
1111
- boost::split (vDeploymentParams, i , boost::is_any_of (" :" ));
1109
+ boost::split (vDeploymentParams, strDeployment , boost::is_any_of (" :" ));
1112
1110
if (vDeploymentParams.size () != 3 ) {
1113
1111
return InitError (" BIP9 parameters malformed, expecting deployment:start:end" );
1114
1112
}
0 commit comments