Fix RCS1049
This commit is contained in:
@@ -971,6 +971,9 @@ dotnet_diagnostic.RCS1043.severity = warning
|
||||
# Use lambda expression instead of anonymous method.
|
||||
dotnet_diagnostic.RCS1048.severity = warning
|
||||
|
||||
# Simplify boolean comparison.
|
||||
dotnet_diagnostic.RCS1049.severity = warning
|
||||
|
||||
# Avoid locking on publicly accessible instance.
|
||||
dotnet_diagnostic.RCS1059.severity = warning
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||
if (parts.Count == 0
|
||||
|| (parts[0][0] != Path.DirectorySeparatorChar
|
||||
&& parts[0][0] != Path.AltDirectorySeparatorChar
|
||||
&& parts[0].Contains(':') == false
|
||||
&& !parts[0].Contains(':')
|
||||
&& parts[0] != "." + Path.DirectorySeparatorChar
|
||||
&& parts[0] != "." + Path.AltDirectorySeparatorChar
|
||||
&& parts[0] != ".." + Path.DirectorySeparatorChar
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
var nowHasPrerequisites = !hasReachedLimit && HasPrerequisites(ownedPrerequisites);
|
||||
var nowHidden = IsHidden(ownedPrerequisites);
|
||||
|
||||
if (initialized == false)
|
||||
if (!initialized)
|
||||
{
|
||||
initialized = true;
|
||||
hasPrerequisites = !nowHasPrerequisites;
|
||||
|
||||
@@ -688,7 +688,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
foreach (var replay in replays)
|
||||
replayState[replay].Visible = EvaluateReplayVisibility(replay);
|
||||
|
||||
if (selectedReplay == null || replayState[selectedReplay].Visible == false)
|
||||
if (selectedReplay == null || !replayState[selectedReplay].Visible)
|
||||
SelectFirstVisibleReplay();
|
||||
|
||||
replayList.Layout.AdjustChildren();
|
||||
|
||||
Reference in New Issue
Block a user