Skip to content

Commit

Permalink
Exit the loop after finding the switch name in the map (#9493)
Browse files Browse the repository at this point in the history
  • Loading branch information
f-alizada authored Dec 5, 2023
1 parent f5ae5c6 commit af0e3d0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MSBuild/CommandLineSwitches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,12 +305,12 @@ internal static bool IsParameterlessSwitch(
{
parameterlessSwitch = switchInfo.parameterlessSwitch;
duplicateSwitchErrorMessage = switchInfo.duplicateSwitchErrorMessage;
break;
return true;
}
}
}

return parameterlessSwitch != ParameterlessSwitch.Invalid;
return false;
}

/// <summary>
Expand Down Expand Up @@ -362,12 +362,12 @@ internal static bool IsParameterizedSwitch(
missingParametersErrorMessage = switchInfo.missingParametersErrorMessage;
unquoteParameters = switchInfo.unquoteParameters;
emptyParametersAllowed = switchInfo.emptyParametersAllowed;
break;
return true;
}
}
}

return parameterizedSwitch != ParameterizedSwitch.Invalid;
return false;
}

/// <summary>
Expand Down

0 comments on commit af0e3d0

Please sign in to comment.