Use deconstruction declaration.

This commit is contained in:
Huo Yaoyuan 2019-11-12 18:19:48 +08:00
parent e5e8e70704
commit 0d81b96c5f
3 changed files with 6 additions and 6 deletions

View File

@ -157,7 +157,7 @@ csharp_style_unused_value_assignment_preference = discard_variable:suggestion
#Style - variable declaration #Style - variable declaration
csharp_style_inlined_variable_declaration = true:silent csharp_style_inlined_variable_declaration = true:silent
csharp_style_deconstructed_variable_declaration = true:silent csharp_style_deconstructed_variable_declaration = true:warning
#Style - other C# 7.x features #Style - other C# 7.x features
csharp_style_expression_bodied_local_functions = true:silent csharp_style_expression_bodied_local_functions = true:silent

View File

@ -230,7 +230,7 @@ namespace osu.Game.Tournament.Components
for (var i = 0; i < tuples.Length; i++) for (var i = 0; i < tuples.Length; i++)
{ {
var tuple = tuples[i]; var (heading, content) = tuples[i];
if (i > 0) if (i > 0)
{ {
@ -241,9 +241,9 @@ namespace osu.Game.Tournament.Components
}); });
} }
AddText(new OsuSpriteText { Text = tuple.heading }, s => cp(s, OsuColour.Gray(0.33f))); AddText(new OsuSpriteText { Text = heading }, s => cp(s, OsuColour.Gray(0.33f)));
AddText(" ", s => cp(s, OsuColour.Gray(0.33f))); AddText(" ", s => cp(s, OsuColour.Gray(0.33f)));
AddText(new OsuSpriteText { Text = tuple.content }, s => cp(s, OsuColour.Gray(0.5f))); AddText(new OsuSpriteText { Text = content }, s => cp(s, OsuColour.Gray(0.5f)));
} }
} }
} }

View File

@ -96,8 +96,8 @@ namespace osu.Game.Skinning
if (adjustments != null) if (adjustments != null)
{ {
foreach (var adjustment in adjustments) foreach (var (property, bindable) in adjustments)
ch.AddAdjustment(adjustment.property, adjustment.bindable); ch.AddAdjustment(property, bindable);
} }
} }