1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-07 23:03:21 +08:00

Cleanup CopyFrom() method

Though the code appears slightly different, it should be semantically
equivalent. APIUser equality is implemented on `Id` and `Host` should
never transition from non-null to null.
This commit is contained in:
Dan Balasescu 2024-11-22 17:22:30 +09:00
parent e59ac9e7c8
commit 39504c348d
No known key found for this signature in database

View File

@ -366,12 +366,8 @@ namespace osu.Game.Online.Rooms
{
RoomID = other.RoomID;
Name = other.Name;
Category = other.Category;
if (other.Host != null && Host?.Id != other.Host.Id)
Host = other.Host;
Host = other.Host;
ChannelId = other.ChannelId;
Status = other.Status;
Availability = other.Availability;
@ -387,7 +383,6 @@ namespace osu.Game.Online.Rooms
PlaylistItemStats = other.PlaylistItemStats;
CurrentPlaylistItem = other.CurrentPlaylistItem;
AutoSkip = other.AutoSkip;
Playlist = other.Playlist;
RecentParticipants = other.RecentParticipants;
}