mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Improve fixed code
This commit is contained in:
@@ -545,11 +545,10 @@ namespace osu.Framework.Graphics.UserInterface
|
||||
|
||||
private void updateChildIfNeeded(TabItem<T> child, bool isVisible)
|
||||
{
|
||||
if (!tabVisibility.TryGetValue(child, out bool value) || value != isVisible)
|
||||
if (!tabVisibility.TryGetValue(child, out bool currentVisibility) || currentVisibility != isVisible)
|
||||
{
|
||||
TabVisibilityChanged?.Invoke(child, isVisible);
|
||||
value = isVisible;
|
||||
tabVisibility[child] = value;
|
||||
tabVisibility[child] = isVisible;
|
||||
|
||||
if (isVisible)
|
||||
child.Show();
|
||||
|
||||
@@ -182,10 +182,9 @@ namespace osu.Framework.Input.Handlers.Midi
|
||||
// need running status to be interpreted correctly
|
||||
if (statusType <= 0x7F)
|
||||
{
|
||||
if (!runningStatus.TryGetValue(senderId, out byte value))
|
||||
if (!runningStatus.TryGetValue(senderId, out eventType))
|
||||
throw new InvalidDataException($"Received running status of sender {senderId}, but no event type was stored");
|
||||
|
||||
eventType = value;
|
||||
key = statusType;
|
||||
velocity = data[i++];
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user