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:
xtqqczze
2020-09-02 08:07:49 +05:00
committed by GitHub
parent fe44b1934e
commit 4e21101ba5
4 changed files with 4 additions and 4 deletions
@@ -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>