mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Remove unnecessary full querying
This commit is contained in:
parent
ddcfd854bd
commit
25f511fd5b
@ -48,17 +48,7 @@ namespace osu.Game.Online.Rooms
|
||||
int? beatmapId = SelectedItem.Value.Beatmap.Value.OnlineBeatmapID;
|
||||
string checksum = SelectedItem.Value.Beatmap.Value.MD5Hash;
|
||||
|
||||
BeatmapInfo matchingBeatmap;
|
||||
|
||||
if (databasedSet.Beatmaps == null)
|
||||
{
|
||||
// The given databased beatmap set is not passed in a usable state to check with.
|
||||
// Perform a full query instead, as per https://github.com/ppy/osu/pull/11415.
|
||||
matchingBeatmap = Manager.QueryBeatmap(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);
|
||||
return matchingBeatmap != null;
|
||||
}
|
||||
|
||||
matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);
|
||||
var matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);
|
||||
return matchingBeatmap != null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user