From 0bcf29304b4bf8b03395abf6d61338dd60a3d4fd Mon Sep 17 00:00:00 2001 From: Hivie Date: Fri, 15 Aug 2025 14:41:59 +0100 Subject: [PATCH] more correct hashset usage --- osu.Game/Rulesets/Edit/Checks/CheckHitsoundsFormat.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/osu.Game/Rulesets/Edit/Checks/CheckHitsoundsFormat.cs b/osu.Game/Rulesets/Edit/Checks/CheckHitsoundsFormat.cs index a34d6a3fd0..d28de45fe9 100644 --- a/osu.Game/Rulesets/Edit/Checks/CheckHitsoundsFormat.cs +++ b/osu.Game/Rulesets/Edit/Checks/CheckHitsoundsFormat.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.IO; -using System.Linq; using ManagedBass; using osu.Framework.Audio.Callbacks; using osu.Game.Beatmaps; @@ -30,7 +29,7 @@ namespace osu.Game.Rulesets.Edit.Checks if (beatmapSet == null) yield break; // Collect all audio files from all difficulties to exclude them from the check, as they aren't hitsounds. - var audioFiles = new HashSet(); + var audioFiles = new HashSet(ReferenceEqualityComparer.Instance); foreach (var difficulty in context.AllDifficulties) { @@ -41,7 +40,7 @@ namespace osu.Game.Rulesets.Edit.Checks foreach (var file in beatmapSet.Files) { - if (audioFiles.Any(audioFile => ReferenceEquals(file.File, audioFile.File))) continue; + if (audioFiles.Contains(file)) continue; using (Stream data = context.CurrentDifficulty.Working.GetStream(file.File.GetStoragePath())) {