Skip to content

Commit

Permalink
Update for suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
huoyaoyuan committed Dec 2, 2024
1 parent 68f4fa5 commit 7ece8ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions osu.Game/Overlays/ChatOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,8 @@ private void joinedChannelsChanged(object? sender, NotifyCollectionChangedEventA
{
channelList.RemoveChannel(channel);

if (loadedChannels.TryGetValue(channel, out var loaded))
if (loadedChannels.Remove(channel, out var loaded))
{
loadedChannels.Remove(channel);
// DrawableChannel removed from cache must be manually disposed
loaded.Dispose();
}
Expand Down
4 changes: 2 additions & 2 deletions osu.Game/Rulesets/Mods/ModAdaptiveSpeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,10 @@ public void ApplyToDrawableHitObject(DrawableHitObject drawable)
};
drawable.OnRevertResult += (_, result) =>
{
if (!ratesForRewinding.TryGetValue(result.HitObject, out double rewindValue)) return;
if (!ratesForRewinding.TryGetValue(result.HitObject, out double rate)) return;
if (!shouldProcessResult(result)) return;

recentRates.Insert(0, rewindValue);
recentRates.Insert(0, rate);
ratesForRewinding.Remove(result.HitObject);

recentRates.RemoveAt(recentRates.Count - 1);
Expand Down

0 comments on commit 7ece8ec

Please sign in to comment.