mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Use boolean instead of bitwise operators on bools (#13506)
* Autofix RCS1233: Use short-circuiting operator https://github.com/JosefPihrt/Roslynator/blob/master/docs/analyzers/RCS1233.md
This commit is contained in:
@@ -130,7 +130,7 @@ namespace System.Management.Automation
|
||||
{
|
||||
get
|
||||
{
|
||||
return _hasSetter | _hasSetterByRef;
|
||||
return _hasSetter || _hasSetterByRef;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2257,7 +2257,7 @@ namespace System.Management.Automation
|
||||
|
||||
// If we have one or the other, we can latch onto that set without difficulty
|
||||
uint uniqueSetThatTakesPipelineInput = 0;
|
||||
if ((foundSetThatTakesPipelineInputByValue & foundSetThatTakesPipelineInputByPropertyName) &&
|
||||
if (foundSetThatTakesPipelineInputByValue && foundSetThatTakesPipelineInputByPropertyName &&
|
||||
(setThatTakesPipelineInputByValue == setThatTakesPipelineInputByPropertyName))
|
||||
{
|
||||
uniqueSetThatTakesPipelineInput = setThatTakesPipelineInputByValue;
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace System.Management.Automation.Interpreter
|
||||
|
||||
public bool InClosureOrBoxed
|
||||
{
|
||||
get { return InClosure | IsBoxed; }
|
||||
get { return InClosure || IsBoxed; }
|
||||
}
|
||||
|
||||
internal LocalVariable(int index, bool closure, bool boxed)
|
||||
|
||||
@@ -1352,7 +1352,7 @@ namespace System.Management.Automation.Remoting.Server
|
||||
(UInt32)_dataType,
|
||||
(UInt32)_targetInterface);
|
||||
|
||||
SendDataToClient(dataToSend, (isEndFragment & _shouldFlushData) ? true : false, _reportAsPending, isEndFragment);
|
||||
SendDataToClient(dataToSend, isEndFragment && _shouldFlushData, _reportAsPending, isEndFragment);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user