1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-24 01:33:47 +08:00

Merge pull request #31583 from turbedi/cleanup

Remove redundant ToArray() calls in Osu/ManiaHitObjectComposer
This commit is contained in:
Dean Herbert
2025-01-20 15:48:46 +09:00
committed by GitHub
Unverified
4 changed files with 5 additions and 5 deletions
@@ -64,11 +64,11 @@ namespace osu.Game.Rulesets.Mania.Edit
return;
List<ManiaHitObject> remainingHitObjects = EditorBeatmap.HitObjects.Cast<ManiaHitObject>().Where(h => h.StartTime >= timestamp).ToList();
string[] objectDescriptions = objectDescription.Split(',').ToArray();
string[] objectDescriptions = objectDescription.Split(',');
for (int i = 0; i < objectDescriptions.Length; i++)
{
string[] split = objectDescriptions[i].Split('|').ToArray();
string[] split = objectDescriptions[i].Split('|');
if (split.Length != 2)
continue;
@@ -178,7 +178,7 @@ namespace osu.Game.Rulesets.Osu.Edit
return;
List<OsuHitObject> remainingHitObjects = EditorBeatmap.HitObjects.Cast<OsuHitObject>().Where(h => h.StartTime >= timestamp).ToList();
string[] splitDescription = objectDescription.Split(',').ToArray();
string[] splitDescription = objectDescription.Split(',');
for (int i = 0; i < splitDescription.Length; i++)
{
+1 -1
View File
@@ -33,7 +33,7 @@ namespace osu.Game.Skinning
public ISample? GetSample(ISampleInfo sampleInfo)
{
foreach (string? lookup in sampleInfo.LookupNames)
foreach (string lookup in sampleInfo.LookupNames)
{
ISample? sample = samples.Get(lookup);
if (sample != null)
+1 -1
View File
@@ -170,7 +170,7 @@
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantReadonlyModifier/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantTypeDeclarationBody/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantTypeSpecificationInDefaultExpression/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantLinebreak/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantLinebreak/@EntryIndexedValue">HINT</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantSpace/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantUsingDirective/@EntryIndexedValue">ERROR</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantStringInterpolation/@EntryIndexedValue">WARNING</s:String>