File tree Expand file tree Collapse file tree
osu.Game.Rulesets.Catch/UI Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44using System ;
55using System . Buffers ;
66using System . Diagnostics ;
7- using System . Linq ;
87using osu . Framework . Allocation ;
98using osu . Framework . Bindables ;
109using osu . Framework . Graphics ;
Original file line number Diff line number Diff line change 77using System . Linq ;
88using osu . Framework . Localisation ;
99using osu . Game . Rulesets . Mods ;
10+ using osu . Game . Rulesets . Objects . Drawables ;
1011using osu . Game . Rulesets . Objects . Types ;
1112using osu . Game . Rulesets . Osu . Objects ;
1213using osu . Game . Rulesets . Osu . Objects . Drawables ;
Original file line number Diff line number Diff line change 66using System ;
77using System . Collections . Generic ;
88using System . Diagnostics ;
9- using System . Linq ;
109using osu . Framework . Allocation ;
1110using osu . Framework . Bindables ;
1211using osu . Framework . Graphics ;
Original file line number Diff line number Diff line change @@ -166,8 +166,8 @@ protected override void LoadSamples()
166166
167167 // HitSampleInfo : ISampleInfo (reference type) — array covariance lets us cast directly,
168168 // avoiding a second array allocation from .Cast<ISampleInfo>().ToArray().
169- Samples . Samples = ( ISampleInfo [ ] ) HitObject . TailSamples . ToArray ( ) ;
170- slidingSample . Samples = ( ISampleInfo [ ] ) HitObject . CreateSlidingSamples ( ) . ToArray ( ) ;
169+ Samples . Samples = HitObject . TailSamples . ToArray ( ) ;
170+ slidingSample . Samples = HitObject . CreateSlidingSamples ( ) . ToArray ( ) ;
171171 }
172172
173173 public override void StopAllSamples ( )
Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ protected override void LoadSamples()
143143 {
144144 base . LoadSamples ( ) ;
145145
146- spinningSample . Samples = ( ISampleInfo [ ] ) HitObject . CreateSpinningSamples ( ) . ToArray ( ) ;
146+ spinningSample . Samples = HitObject . CreateSpinningSamples ( ) . ToArray ( ) ;
147147 spinningSample . Frequency . Value = spinning_sample_initial_frequency ;
148148
149149 maxBonusSample . Samples = new ISampleInfo [ ] { new SpinnerBonusMaxSampleInfo ( HitObject . CreateHitSampleInfo ( ) ) } ;
@@ -352,7 +352,7 @@ private void updateBonusScore()
352352 while ( completedFullSpins . Value != spins )
353353 {
354354 // Manual forward scan avoids allocating a LINQ delegate per spin completion.
355- DrawableSpinnerTick ? tick = null ;
355+ DrawableSpinnerTick tick = null ;
356356
357357 foreach ( var t in ticks )
358358 {
Original file line number Diff line number Diff line change 44using System ;
55using System . Collections . Generic ;
66using System . Diagnostics ;
7- using System . Linq ;
87using osu . Framework . Allocation ;
98using osu . Framework . Graphics ;
109using osu . Framework . Input ;
@@ -95,8 +94,7 @@ public void PostProcessHeadJudgement(DrawableSliderHead head)
9594
9695 foreach ( var nestedObj in slider . NestedHitObjects )
9796 {
98- var nested = nestedObj as DrawableOsuHitObject ;
99- if ( nested == null ) continue ;
97+ if ( nestedObj is not DrawableOsuHitObject nested ) continue ;
10098
10199 // Skip nested objects that are already judged.
102100 if ( nested . Judged )
@@ -122,8 +120,7 @@ public void PostProcessHeadJudgement(DrawableSliderHead head)
122120
123121 foreach ( var nestedObj in slider . NestedHitObjects )
124122 {
125- var nested = nestedObj as DrawableOsuHitObject ;
126- if ( nested == null ) continue ;
123+ if ( nestedObj is not DrawableOsuHitObject nested ) continue ;
127124
128125 // Skip nested objects that are already judged.
129126 if ( nested . Judged )
You can’t perform that action at this time.
0 commit comments