Convert == usages to ReferenceEquals

This commit is contained in:
Dan Balasescu
2022-06-20 16:53:03 +09:00
parent 16281f4a48
commit e0c82d11ab
12 changed files with 20 additions and 19 deletions

View File

@ -65,7 +65,8 @@ namespace osu.Game.Screens.Edit.Timing
selectedGroup.BindValueChanged(group =>
{
// TODO: This should scroll the selected row into view.
foreach (var b in BackgroundFlow) b.Selected = b.Item == group.NewValue;
foreach (var b in BackgroundFlow)
b.Selected = ReferenceEquals(b.Item, group.NewValue);
}, true);
}

View File

@ -222,7 +222,7 @@ namespace osu.Game.Screens.Edit.Timing
// Try and create matching types from the currently selected control point.
var selected = selectedGroup.Value;
if (selected != null && selected != group)
if (selected != null && !ReferenceEquals(selected, group))
{
foreach (var controlPoint in selected.ControlPoints)
{

View File

@ -128,7 +128,7 @@ namespace osu.Game.Screens.Edit.Timing
double? offsetChange = newStartTime - selectedGroupStartTime;
var nextGroup = editorBeatmap.ControlPointInfo.TimingPoints
.SkipWhile(g => g != tcp)
.SkipWhile(g => !ReferenceEquals(g, tcp))
.Skip(1)
.FirstOrDefault();