From 31efe9e071e135d0f2355bebf3e0cc3a0b2e3a1b Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 27 Mar 2026 10:04:07 +0000
Subject: [PATCH 01/16] Initial plan
From 37030ecb15b3ff3a01580143ac1828c2f5cef270 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 27 Mar 2026 10:18:35 +0000
Subject: [PATCH 02/16] Upgrade entire project from .NET 8 (C# 12) to .NET 10
(C# 14)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- global.json: SDK 8.0.100 → 10.0.100
- Directory.Build.props: LangVersion 12.0 → 14.0
- All 34 csproj files: net8.0 → net10.0 (including android/ios variants)
- All CI workflows: dotnet-version 8.0.x → 10.0.x
- Humanizer: 2.14.1 → 3.0.10 (was held back for .NET 9+ requirement)
- Fixed Humanizer.Localisation → Humanizer namespace migration
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/f7af1d57-4873-47a0-96fb-6b14be21812a
Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
---
.github/workflows/ci.yml | 16 ++++++++--------
.github/workflows/deploy.yml | 4 ++--
.github/workflows/release.yml | 10 +++++-----
.github/workflows/update-web-mod-definitions.yml | 4 ++--
Directory.Build.props | 2 +-
.../osu.Game.Rulesets.EmptyFreeform.Tests.csproj | 2 +-
.../osu.Game.Rulesets.EmptyFreeform.csproj | 2 +-
.../osu.Game.Rulesets.Pippidon.Tests.csproj | 2 +-
.../osu.Game.Rulesets.Pippidon.csproj | 2 +-
...osu.Game.Rulesets.EmptyScrolling.Tests.csproj | 2 +-
.../osu.Game.Rulesets.EmptyScrolling.csproj | 2 +-
.../osu.Game.Rulesets.Pippidon.Tests.csproj | 2 +-
.../osu.Game.Rulesets.Pippidon.csproj | 2 +-
global.json | 2 +-
osu.Android/osu.Android.csproj | 2 +-
osu.Desktop/osu.Desktop.csproj | 2 +-
osu.Game.Benchmarks/osu.Game.Benchmarks.csproj | 2 +-
.../osu.Game.Rulesets.Catch.Tests.Android.csproj | 2 +-
.../osu.Game.Rulesets.Catch.Tests.iOS.csproj | 2 +-
.../osu.Game.Rulesets.Catch.Tests.csproj | 2 +-
.../osu.Game.Rulesets.Catch.csproj | 2 +-
.../osu.Game.Rulesets.Mania.Tests.Android.csproj | 2 +-
.../osu.Game.Rulesets.Mania.Tests.iOS.csproj | 2 +-
.../osu.Game.Rulesets.Mania.Tests.csproj | 2 +-
.../osu.Game.Rulesets.Mania.csproj | 2 +-
.../osu.Game.Rulesets.Osu.Tests.Android.csproj | 2 +-
.../osu.Game.Rulesets.Osu.Tests.iOS.csproj | 2 +-
.../osu.Game.Rulesets.Osu.Tests.csproj | 2 +-
.../osu.Game.Rulesets.Osu.csproj | 2 +-
.../osu.Game.Rulesets.Taiko.Tests.Android.csproj | 2 +-
.../osu.Game.Rulesets.Taiko.Tests.iOS.csproj | 2 +-
.../osu.Game.Rulesets.Taiko.Tests.csproj | 2 +-
.../osu.Game.Rulesets.Taiko.csproj | 2 +-
.../osu.Game.Tests.Android.csproj | 2 +-
osu.Game.Tests.iOS/osu.Game.Tests.iOS.csproj | 2 +-
osu.Game.Tests/osu.Game.Tests.csproj | 2 +-
.../osu.Game.Tournament.Tests.csproj | 2 +-
osu.Game.Tournament/osu.Game.Tournament.csproj | 2 +-
.../Multiplayer/ServerShutdownNotification.cs | 2 +-
osu.Game/Online/Rooms/PlaylistExtensions.cs | 2 +-
.../Playlists/PlaylistsRoomSettingsOverlay.cs | 2 +-
osu.Game/Utils/HumanizerUtils.cs | 2 +-
osu.Game/osu.Game.csproj | 5 ++---
osu.iOS/osu.iOS.csproj | 2 +-
44 files changed, 58 insertions(+), 59 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7b98a81c3a6d..101d91d2ceae 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -16,10 +16,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Restore Tools
run: dotnet tool restore
@@ -78,10 +78,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Compile
run: dotnet build -c Debug -warnaserror osu.Desktop.slnf
@@ -123,10 +123,10 @@ jobs:
distribution: microsoft
java-version: 11
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Install .NET workloads
run: dotnet workload install android
@@ -142,10 +142,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v6
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Install .NET Workloads
run: dotnet workload install ios
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 5c87d79000d5..c8cf4ead6f8c 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -50,10 +50,10 @@ jobs:
id: artifactsPath
run: echo "::set-output name=nuget_artifacts::${{github.workspace}}/artifacts"
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Pack
run: |
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 5c68e18e838c..e73228573db6 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -24,10 +24,10 @@ jobs:
distribution: microsoft
java-version: 17
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v5
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Install .NET Android workload
run: dotnet workload install android
@@ -89,7 +89,7 @@ jobs:
run: >
dotnet publish -c Release
osu.Android/osu.Android.csproj
- -f net8.0-android
+ -f net10.0-android
-p:Version=${{ steps.version.outputs.version }}
-p:ApplicationDisplayVersion=${{ steps.version.outputs.version }}
-p:ApplicationVersion=${{ github.run_number }}
@@ -104,7 +104,7 @@ jobs:
run: >
dotnet publish -c Release
osu.Android/osu.Android.csproj
- -f net8.0-android
+ -f net10.0-android
-p:Version=${{ steps.version.outputs.version }}
-p:ApplicationDisplayVersion=${{ steps.version.outputs.version }}
-p:ApplicationVersion=${{ github.run_number }}
@@ -113,7 +113,7 @@ jobs:
- name: Find APK
id: find_apk
run: |
- PUBLISH_DIR="osu.Android/bin/Release/net8.0-android/publish"
+ PUBLISH_DIR="osu.Android/bin/Release/net10.0-android/publish"
APK=$(find "$PUBLISH_DIR" -maxdepth 1 -name "*.apk" 2>/dev/null | head -1)
if [ -z "$APK" ]; then
APK=$(find osu.Android/bin/Release -name "*.apk" | head -1)
diff --git a/.github/workflows/update-web-mod-definitions.yml b/.github/workflows/update-web-mod-definitions.yml
index 160872a9a114..35a82fb2aba9 100644
--- a/.github/workflows/update-web-mod-definitions.yml
+++ b/.github/workflows/update-web-mod-definitions.yml
@@ -12,10 +12,10 @@ jobs:
name: Update osu-web mod definitions
runs-on: ubuntu-latest
steps:
- - name: Install .NET 8.0.x
+ - name: Install .NET 10.0.x
uses: actions/setup-dotnet@v4
with:
- dotnet-version: "8.0.x"
+ dotnet-version: "10.0.x"
- name: Checkout ppy/osu
uses: actions/checkout@v4
diff --git a/Directory.Build.props b/Directory.Build.props
index a856825d873e..607ee1ed9e33 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,7 +1,7 @@
- 12.0
+ 14.0
enable
false
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
index 4fa8b9409900..4fa61d32bae1 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform.Tests/osu.Game.Rulesets.EmptyFreeform.Tests.csproj
@@ -18,7 +18,7 @@
WinExe
- net8.0
+ net10.0
osu.Game.Rulesets.EmptyFreeform.Tests
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
index 89abd5665c1c..dc426146dad1 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/osu.Game.Rulesets.EmptyFreeform.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
osu.Game.Rulesets.EmptyFreeform
Library
AnyCPU
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
index bb95c675fcf8..6b3e2f733478 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
@@ -18,7 +18,7 @@
WinExe
- net8.0
+ net10.0
osu.Game.Rulesets.Pippidon.Tests
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
index 165b6b6c6b89..23a5a46c2ca3 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
osu.Game.Rulesets.Pippidon
Library
AnyCPU
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
index fc170b2c24e3..282f949c2b83 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling.Tests/osu.Game.Rulesets.EmptyScrolling.Tests.csproj
@@ -18,7 +18,7 @@
WinExe
- net8.0
+ net10.0
osu.Game.Rulesets.EmptyScrolling.Tests
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
index 6d9565a6f2ee..544abba0c004 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/osu.Game.Rulesets.EmptyScrolling.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
osu.Game.Rulesets.EmptyScrolling
Library
AnyCPU
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
index bb95c675fcf8..6b3e2f733478 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon.Tests/osu.Game.Rulesets.Pippidon.Tests.csproj
@@ -18,7 +18,7 @@
WinExe
- net8.0
+ net10.0
osu.Game.Rulesets.Pippidon.Tests
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
index 165b6b6c6b89..23a5a46c2ca3 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/osu.Game.Rulesets.Pippidon.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
osu.Game.Rulesets.Pippidon
Library
AnyCPU
diff --git a/global.json b/global.json
index 789bff3bd0c2..fe7e453b1cd8 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "8.0.100",
+ "version": "10.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
diff --git a/osu.Android/osu.Android.csproj b/osu.Android/osu.Android.csproj
index 63e57c5bb91b..7b2cbfca56ad 100644
--- a/osu.Android/osu.Android.csproj
+++ b/osu.Android/osu.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Android
osu.Android
diff --git a/osu.Desktop/osu.Desktop.csproj b/osu.Desktop/osu.Desktop.csproj
index bd0f4448fc8e..2bdba09e0675 100644
--- a/osu.Desktop/osu.Desktop.csproj
+++ b/osu.Desktop/osu.Desktop.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
WinExe
true
A free-to-win rhythm game. Rhythm is just a *click* away!
diff --git a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
index 104ee50fe105..fbcf09696be8 100644
--- a/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
+++ b/osu.Game.Benchmarks/osu.Game.Benchmarks.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net10.0
Exe
false
diff --git a/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj b/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
index 4b2e54be6736..093172fb19dd 100644
--- a/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Catch.Tests.Android/osu.Game.Rulesets.Catch.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Rulesets.Catch.Tests
osu.Game.Rulesets.Catch.Tests.Android
diff --git a/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj b/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
index 9c262a752a98..eda288b1d90c 100644
--- a/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Catch.Tests.iOS/osu.Game.Rulesets.Catch.Tests.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
osu.Game.Rulesets.Catch.Tests
osu.Game.Rulesets.Catch.Tests.iOS
diff --git a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
index 132bc4bed1f3..1a2422086d2b 100644
--- a/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
+++ b/osu.Game.Rulesets.Catch.Tests/osu.Game.Rulesets.Catch.Tests.csproj
@@ -7,7 +7,7 @@
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj b/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj
index a5138ffb3903..fbd7369412bf 100644
--- a/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj
+++ b/osu.Game.Rulesets.Catch/osu.Game.Rulesets.Catch.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
catch the fruit. to the beat.
diff --git a/osu.Game.Rulesets.Mania.Tests.Android/osu.Game.Rulesets.Mania.Tests.Android.csproj b/osu.Game.Rulesets.Mania.Tests.Android/osu.Game.Rulesets.Mania.Tests.Android.csproj
index 2866508a0227..7329bf8ec2bf 100644
--- a/osu.Game.Rulesets.Mania.Tests.Android/osu.Game.Rulesets.Mania.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Mania.Tests.Android/osu.Game.Rulesets.Mania.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Rulesets.Mania.Tests
osu.Game.Rulesets.Mania.Tests.Android
diff --git a/osu.Game.Rulesets.Mania.Tests.iOS/osu.Game.Rulesets.Mania.Tests.iOS.csproj b/osu.Game.Rulesets.Mania.Tests.iOS/osu.Game.Rulesets.Mania.Tests.iOS.csproj
index d51e541e95bb..29c7c9ff55e8 100644
--- a/osu.Game.Rulesets.Mania.Tests.iOS/osu.Game.Rulesets.Mania.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Mania.Tests.iOS/osu.Game.Rulesets.Mania.Tests.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
osu.Game.Rulesets.Mania.Tests
osu.Game.Rulesets.Mania.Tests.iOS
diff --git a/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj b/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
index 8d5c4d9da61b..ff1711a8086a 100644
--- a/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
+++ b/osu.Game.Rulesets.Mania.Tests/osu.Game.Rulesets.Mania.Tests.csproj
@@ -7,7 +7,7 @@
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj b/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj
index 3bca9384506b..61caec5f96bf 100644
--- a/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj
+++ b/osu.Game.Rulesets.Mania/osu.Game.Rulesets.Mania.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
smash the keys. to the beat.
diff --git a/osu.Game.Rulesets.Osu.Tests.Android/osu.Game.Rulesets.Osu.Tests.Android.csproj b/osu.Game.Rulesets.Osu.Tests.Android/osu.Game.Rulesets.Osu.Tests.Android.csproj
index b79de6d40bda..e7df5448524d 100644
--- a/osu.Game.Rulesets.Osu.Tests.Android/osu.Game.Rulesets.Osu.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Osu.Tests.Android/osu.Game.Rulesets.Osu.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Rulesets.Osu.Tests
osu.Game.Rulesets.Osu.Tests.Android
diff --git a/osu.Game.Rulesets.Osu.Tests.iOS/osu.Game.Rulesets.Osu.Tests.iOS.csproj b/osu.Game.Rulesets.Osu.Tests.iOS/osu.Game.Rulesets.Osu.Tests.iOS.csproj
index cd4fbcc00e02..afa1b87cd70a 100644
--- a/osu.Game.Rulesets.Osu.Tests.iOS/osu.Game.Rulesets.Osu.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Osu.Tests.iOS/osu.Game.Rulesets.Osu.Tests.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
Exe
osu.Game.Rulesets.Osu.Tests
diff --git a/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj b/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
index 15dca424f32d..335efa712603 100644
--- a/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
+++ b/osu.Game.Rulesets.Osu.Tests/osu.Game.Rulesets.Osu.Tests.csproj
@@ -8,7 +8,7 @@
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj
index 7817d55f57ce..a9362e980a0f 100644
--- a/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj
+++ b/osu.Game.Rulesets.Osu/osu.Game.Rulesets.Osu.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
click the circles. to the beat.
diff --git a/osu.Game.Rulesets.Taiko.Tests.Android/osu.Game.Rulesets.Taiko.Tests.Android.csproj b/osu.Game.Rulesets.Taiko.Tests.Android/osu.Game.Rulesets.Taiko.Tests.Android.csproj
index 88aa137797a6..15f7b7c8877c 100644
--- a/osu.Game.Rulesets.Taiko.Tests.Android/osu.Game.Rulesets.Taiko.Tests.Android.csproj
+++ b/osu.Game.Rulesets.Taiko.Tests.Android/osu.Game.Rulesets.Taiko.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Rulesets.Taiko.Tests
osu.Game.Rulesets.Taiko.Tests.Android
diff --git a/osu.Game.Rulesets.Taiko.Tests.iOS/osu.Game.Rulesets.Taiko.Tests.iOS.csproj b/osu.Game.Rulesets.Taiko.Tests.iOS/osu.Game.Rulesets.Taiko.Tests.iOS.csproj
index 46ac59a1e782..4449c478489b 100644
--- a/osu.Game.Rulesets.Taiko.Tests.iOS/osu.Game.Rulesets.Taiko.Tests.iOS.csproj
+++ b/osu.Game.Rulesets.Taiko.Tests.iOS/osu.Game.Rulesets.Taiko.Tests.iOS.csproj
@@ -1,7 +1,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
osu.Game.Rulesets.Taiko.Tests
osu.Game.Rulesets.Taiko.Tests.iOS
diff --git a/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj b/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
index facb0d0cfbce..80936a2c86fe 100644
--- a/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
+++ b/osu.Game.Rulesets.Taiko.Tests/osu.Game.Rulesets.Taiko.Tests.csproj
@@ -7,7 +7,7 @@
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj b/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj
index cacba55c2af7..da4b0cbc7a8b 100644
--- a/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj
+++ b/osu.Game.Rulesets.Taiko/osu.Game.Rulesets.Taiko.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
bash the drum. to the beat.
diff --git a/osu.Game.Tests.Android/osu.Game.Tests.Android.csproj b/osu.Game.Tests.Android/osu.Game.Tests.Android.csproj
index a8fc9536b912..a11ffb65e69b 100644
--- a/osu.Game.Tests.Android/osu.Game.Tests.Android.csproj
+++ b/osu.Game.Tests.Android/osu.Game.Tests.Android.csproj
@@ -1,7 +1,7 @@
- net8.0-android
+ net10.0-android
Exe
osu.Game.Tests
osu.Game.Tests.Android
diff --git a/osu.Game.Tests.iOS/osu.Game.Tests.iOS.csproj b/osu.Game.Tests.iOS/osu.Game.Tests.iOS.csproj
index 9f13b0587bd8..0b58923dedd2 100644
--- a/osu.Game.Tests.iOS/osu.Game.Tests.iOS.csproj
+++ b/osu.Game.Tests.iOS/osu.Game.Tests.iOS.csproj
@@ -2,7 +2,7 @@
Exe
- net8.0-ios
+ net10.0-ios
13.4
osu.Game.Tests
osu.Game.Tests.iOS
diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj
index 6f970df4c5cd..bf9d0d99ffb7 100644
--- a/osu.Game.Tests/osu.Game.Tests.csproj
+++ b/osu.Game.Tests/osu.Game.Tests.csproj
@@ -10,7 +10,7 @@
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj b/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
index 83637ab25174..56678c48dd5b 100644
--- a/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
+++ b/osu.Game.Tournament.Tests/osu.Game.Tournament.Tests.csproj
@@ -10,7 +10,7 @@
WinExe
- net8.0
+ net10.0
diff --git a/osu.Game.Tournament/osu.Game.Tournament.csproj b/osu.Game.Tournament/osu.Game.Tournament.csproj
index 2fa71432167c..b60455a3806f 100644
--- a/osu.Game.Tournament/osu.Game.Tournament.csproj
+++ b/osu.Game.Tournament/osu.Game.Tournament.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
tools for tournaments.
diff --git a/osu.Game/Online/Multiplayer/ServerShutdownNotification.cs b/osu.Game/Online/Multiplayer/ServerShutdownNotification.cs
index 5a6367b06b33..ed0159d16bff 100644
--- a/osu.Game/Online/Multiplayer/ServerShutdownNotification.cs
+++ b/osu.Game/Online/Multiplayer/ServerShutdownNotification.cs
@@ -2,7 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System;
-using Humanizer.Localisation;
+using Humanizer;
using osu.Framework.Allocation;
using osu.Framework.Threading;
using osu.Game.Localisation;
diff --git a/osu.Game/Online/Rooms/PlaylistExtensions.cs b/osu.Game/Online/Rooms/PlaylistExtensions.cs
index 8afa7d90f8c3..9b3cb6c9eeda 100644
--- a/osu.Game/Online/Rooms/PlaylistExtensions.cs
+++ b/osu.Game/Online/Rooms/PlaylistExtensions.cs
@@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Linq;
using Humanizer;
-using Humanizer.Localisation;
+
using osu.Game.Rulesets;
using osu.Game.Utils;
diff --git a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSettingsOverlay.cs b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSettingsOverlay.cs
index 378410d77df0..cd46ae1327d2 100644
--- a/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSettingsOverlay.cs
+++ b/osu.Game/Screens/OnlinePlay/Playlists/PlaylistsRoomSettingsOverlay.cs
@@ -6,7 +6,7 @@
using System.ComponentModel;
using System.Linq;
using Humanizer;
-using Humanizer.Localisation;
+
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
diff --git a/osu.Game/Utils/HumanizerUtils.cs b/osu.Game/Utils/HumanizerUtils.cs
index 0da346ed73e2..23345756e8fa 100644
--- a/osu.Game/Utils/HumanizerUtils.cs
+++ b/osu.Game/Utils/HumanizerUtils.cs
@@ -4,7 +4,7 @@
using System;
using System.Globalization;
using Humanizer;
-using Humanizer.Localisation;
+
namespace osu.Game.Utils
{
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index 4ca602fcf9fb..89220336c048 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -1,6 +1,6 @@
- net8.0
+ net10.0
Library
true
@@ -24,8 +24,7 @@
-
-
+
diff --git a/osu.iOS/osu.iOS.csproj b/osu.iOS/osu.iOS.csproj
index 04c00b4c3597..93aa38c95452 100644
--- a/osu.iOS/osu.iOS.csproj
+++ b/osu.iOS/osu.iOS.csproj
@@ -1,6 +1,6 @@
- net8.0-ios
+ net10.0-ios
13.4
Exe
0.1.0
From c4c274a9966533a295db81ba308bbedbe2022338 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 27 Mar 2026 10:34:53 +0000
Subject: [PATCH 03/16] Apply .NET 10 / C# 14 code optimizations across entire
codebase
- Replace 9 object lock fields with System.Threading.Lock (better perf)
- Convert 240 Array.Empty() calls to [] collection expressions
- Remove unnecessary legacy packages (System.IO.FileSystem.Primitives,
System.Runtime.InteropServices, System.Runtime.Handles,
System.ComponentModel.Annotations, Microsoft.Win32.Registry)
- Fix type inference edge cases where [] needs explicit typing
Agent-Logs-Url: https://github.com/winnerspiros/osu/sessions/f7af1d57-4873-47a0-96fb-6b14be21812a
Co-authored-by: winnerspiros <1675249+winnerspiros@users.noreply.github.com>
---
.../EmptyFreeformDifficultyCalculator.cs | 2 +-
.../EmptyFreeformRuleset.cs | 2 +-
.../PippidonDifficultyCalculator.cs | 2 +-
.../PippidonRuleset.cs | 2 +-
.../EmptyScrollingDifficultyCalculator.cs | 2 +-
.../EmptyScrollingRuleset.cs | 2 +-
.../PippidonDifficultyCalculator.cs | 2 +-
.../PippidonRuleset.cs | 2 +-
.../JuiceStreamPathTest.cs | 2 +-
osu.Game.Rulesets.Catch/CatchRuleset.cs | 2 +-
.../Editor/ManiaPlacementBlueprintTestScene.cs | 2 +-
osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs | 2 +-
osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs | 2 +-
osu.Game.Rulesets.Mania/ManiaRuleset.cs | 4 ++--
osu.Game.Rulesets.Osu.Tests/StackingTest.cs | 4 ++--
.../TestSceneHitCircleLateFade.cs | 6 +++---
osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs | 2 +-
.../TestSceneSpinnerInput.cs | 2 +-
osu.Game.Rulesets.Osu/Objects/Spinner.cs | 2 +-
osu.Game.Rulesets.Osu/OsuRuleset.cs | 2 +-
osu.Game.Rulesets.Osu/Skinning/SliderBody.cs | 2 +-
.../Judgements/JudgementTest.cs | 2 +-
osu.Game.Rulesets.Taiko/TaikoRuleset.cs | 2 +-
.../Beatmaps/Formats/LegacyBeatmapDecoderTest.cs | 8 ++++----
.../Beatmaps/TestSceneBeatmapDifficultyCache.cs | 2 +-
osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs | 2 +-
osu.Game.Tests/Database/RulesetStoreTests.cs | 2 +-
.../Editing/Checks/CheckBackgroundQualityTest.cs | 2 +-
.../Editing/Checks/CheckPreviewTimeTest.cs | 2 +-
osu.Game.Tests/Mods/ModUtilsTest.cs | 2 +-
.../Mods/TestCustomisableModRuleset.cs | 2 +-
.../TestSceneTimedDifficultyCalculation.cs | 2 +-
.../Testing/TestSceneRulesetDependencies.cs | 2 +-
.../Visual/Gameplay/TestSceneFailAnimation.cs | 2 +-
.../Visual/Gameplay/TestSceneFailJudgement.cs | 2 +-
.../Visual/Gameplay/TestSceneHUDOverlay.cs | 2 +-
.../Gameplay/TestScenePlayerMaxDimensions.cs | 2 +-
.../Visual/Gameplay/TestScenePoolingRuleset.cs | 2 +-
.../Visual/Gameplay/TestSceneReplay.cs | 4 ++--
.../Gameplay/TestSceneScrollingHitObjects.cs | 2 +-
.../Gameplay/TestSceneSkinnableHUDOverlay.cs | 2 +-
.../TestSceneStoryboardSamplePlayback.cs | 2 +-
.../Matchmaking/TestSceneBeatmapSelectGrid.cs | 4 ++--
.../Multiplayer/TestSceneMultiSpectatorScreen.cs | 2 +-
.../TestSceneMultiplayerMatchSongSelect.cs | 2 +-
.../TestSceneMultiplayerMatchSubScreen.cs | 2 +-
.../Multiplayer/TestSceneMultiplayerPlayer.cs | 2 +-
.../Multiplayer/TestScenePlaylistsSongSelect.cs | 2 +-
.../Visual/Online/TestSceneAdvancedStats.cs | 2 +-
.../Online/TestSceneBeatmapListingOverlay.cs | 16 ++++++++--------
.../Visual/Online/TestSceneBeatmapSetOverlay.cs | 2 +-
.../Visual/Online/TestSceneDrawableComment.cs | 2 +-
osu.Game.Tests/Visual/Online/TestSceneGraph.cs | 2 +-
.../Visual/Online/TestSceneNewsSidebar.cs | 2 +-
.../Online/TestScenePlayHistorySubsection.cs | 2 +-
.../Visual/Online/TestSceneUserHistoryGraph.cs | 2 +-
.../Visual/Online/TestSceneUserProfileOverlay.cs | 2 +-
...stSceneUserProfilePreviousUsernamesDisplay.cs | 2 +-
.../TestSceneBeatmapLeaderboardWedge.cs | 2 +-
.../SongSelect/TestSceneBeatmapMetadataWedge.cs | 4 ++--
.../TestSceneDifficultyStatisticsDisplay.cs | 2 +-
.../SongSelect/TestSceneFooterButtonMods.cs | 6 +++---
.../Visual/SongSelect/TestSceneSongSelect.cs | 6 +++---
.../SongSelect/TestSceneSongSelectFiltering.cs | 4 ++--
.../TestSceneBeatmapAttributeText.cs | 4 ++--
.../TestSceneModCustomisationPanel.cs | 4 ++--
.../Visual/UserInterface/TestSceneModPanel.cs | 2 +-
.../UserInterface/TestSceneModPresetColumn.cs | 12 ++++++------
.../UserInterface/TestSceneModPresetPanel.cs | 4 ++--
.../Ladder/Components/DrawableMatchTeam.cs | 2 +-
osu.Game.Tournament/osu.Game.Tournament.csproj | 1 -
osu.Game/Beatmaps/APIFailTimes.cs | 4 ++--
osu.Game/Beatmaps/Beatmap.cs | 2 +-
osu.Game/Beatmaps/BeatmapDifficultyCache.cs | 4 ++--
.../BeatmapPanelBackgroundTextureLoaderStore.cs | 2 +-
osu.Game/Beatmaps/DummyWorkingBeatmap.cs | 2 +-
osu.Game/Beatmaps/WorkingBeatmap.cs | 4 ++--
osu.Game/Database/LegacyBeatmapImporter.cs | 2 +-
osu.Game/Database/OnlineLookupCache.cs | 2 +-
osu.Game/Database/RealmResetEmptySet.cs | 2 +-
osu.Game/Graphics/ScreenshotManager.cs | 2 +-
osu.Game/Graphics/UserInterface/BarGraph.cs | 2 +-
.../Graphics/UserInterface/SegmentedGraph.cs | 6 +++---
osu.Game/IO/Legacy/SerializationReader.cs | 4 ++--
osu.Game/IO/MigratableStorage.cs | 6 +++---
osu.Game/Input/Handlers/ReplayInputHandler.cs | 4 ++--
osu.Game/Online/API/APIRequest.cs | 3 ++-
osu.Game/Online/API/OAuth.cs | 3 ++-
osu.Game/Online/API/RegistrationRequest.cs | 6 +++---
osu.Game/Online/API/Requests/GetScoresRequest.cs | 2 +-
.../Online/API/Requests/Responses/APIBeatmap.cs | 2 +-
.../API/Requests/Responses/APIBeatmapSet.cs | 4 ++--
.../API/Requests/Responses/APIMenuContent.cs | 2 +-
.../API/Requests/Responses/APITagCollection.cs | 2 +-
.../Requests/Responses/APIUserScoreAggregate.cs | 2 +-
.../API/Requests/Responses/ChatAckResponse.cs | 2 +-
.../Requests/Responses/PutBeatmapSetResponse.cs | 4 ++--
.../API/Requests/Responses/SoloScoreInfo.cs | 2 +-
.../Multiplayer/OnlineMultiplayerClient.cs | 2 +-
osu.Game/Online/Rooms/MultiplayerScore.cs | 2 +-
osu.Game/Online/Rooms/PlaylistItem.cs | 4 ++--
.../Online/Spectator/SpectatorScoreProcessor.cs | 2 +-
osu.Game/OsuGame.cs | 2 +-
osu.Game/OsuGameBase.cs | 2 +-
osu.Game/Overlays/BeatmapSet/AdvancedStats.cs | 2 +-
osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs | 2 +-
osu.Game/Overlays/BeatmapSet/FailRetryGraph.cs | 4 ++--
osu.Game/Overlays/BeatmapSet/Info.cs | 2 +-
osu.Game/Overlays/Chat/DrawableChatUsername.cs | 4 ++--
osu.Game/Overlays/FirstRunSetup/ScreenUIScale.cs | 2 +-
osu.Game/Overlays/Mods/ModColumn.cs | 2 +-
osu.Game/Overlays/Mods/ModCustomisationPanel.cs | 2 +-
osu.Game/Overlays/Mods/ModSelectOverlay.cs | 6 +++---
osu.Game/Overlays/NotificationOverlay.cs | 2 +-
.../Sections/Historical/ProfileLineChart.cs | 2 +-
.../Settings/Sections/Input/KeyBindingRow.cs | 2 +-
.../Sections/Input/KeyBindingsSubsection.cs | 2 +-
osu.Game/Overlays/Settings/SettingsButton.cs | 2 +-
osu.Game/Overlays/Settings/SettingsButtonV2.cs | 2 +-
osu.Game/Overlays/Settings/SettingsItem.cs | 2 +-
.../Overlays/SkinEditor/ExternalEditOverlay.cs | 2 +-
osu.Game/Overlays/UserProfileOverlay.cs | 2 +-
.../Rulesets/Difficulty/DifficultyAttributes.cs | 2 +-
.../Rulesets/Difficulty/DifficultyCalculator.cs | 8 ++++----
.../Rulesets/Edit/Checks/Components/Issue.cs | 2 +-
osu.Game/Rulesets/Edit/SelectionBlueprint.cs | 4 ++--
osu.Game/Rulesets/Mods/Mod.cs | 2 +-
osu.Game/Rulesets/Mods/ModPreset.cs | 2 +-
osu.Game/Rulesets/Objects/SliderPath.cs | 2 +-
osu.Game/Rulesets/Ruleset.cs | 6 +++---
osu.Game/Rulesets/Scoring/ScoreProcessor.cs | 2 +-
osu.Game/Rulesets/UI/DrawableRuleset.cs | 2 +-
.../Scoring/Legacy/LegacyReplaySoloScoreInfo.cs | 2 +-
osu.Game/Scoring/ScoreInfo.cs | 2 +-
.../RadioButtons/EditorRadioButtonCollection.cs | 2 +-
.../Compose/Components/HitObjectInspector.cs | 2 +-
.../Edit/Compose/Components/SelectionHandler.cs | 2 +-
osu.Game/Screens/Edit/EditorLoader.cs | 2 +-
.../OnlinePlay/DailyChallenge/DailyChallenge.cs | 2 +-
.../OnlinePlay/DrawableRoomPlaylistItem.cs | 2 +-
.../GameplayWarmupScreen.MetadataWedge.cs | 2 +-
.../Multiplayer/MultiplayerMatchSongSelect.cs | 2 +-
.../Multiplayer/Participants/ParticipantPanel.cs | 2 +-
.../Playlists/PlaylistsRoomSubScreen.cs | 2 +-
osu.Game/Screens/OsuScreen.cs | 2 +-
osu.Game/Screens/Play/GameplayState.cs | 2 +-
osu.Game/Screens/Play/HUD/ModDisplay.cs | 2 +-
osu.Game/Screens/Play/SquareGraph.cs | 2 +-
osu.Game/Screens/Play/SubmittingPlayer.cs | 3 ++-
.../Screens/Select/BeatmapLeaderboardWedge.cs | 2 +-
.../BeatmapMetadataWedge.FailRetryDisplay.cs | 4 ++--
.../BeatmapMetadataWedge.MetadataDisplay.cs | 2 +-
.../Select/BeatmapMetadataWedge.TagsLine.cs | 2 +-
osu.Game/Screens/Select/BeatmapMetadataWedge.cs | 2 +-
.../BeatmapTitleWedge.DifficultyDisplay.cs | 2 +-
...tmapTitleWedge.DifficultyStatisticsDisplay.cs | 2 +-
osu.Game/Screens/Select/FilterCriteria.cs | 2 +-
osu.Game/Screens/Select/FooterButtonMods.cs | 2 +-
osu.Game/Screens/Select/PanelBeatmap.cs | 2 +-
osu.Game/Screens/Select/PanelBeatmapSet.cs | 2 +-
.../Screens/Select/PanelBeatmapStandalone.cs | 2 +-
osu.Game/Screens/Select/PanelGroup.cs | 2 +-
osu.Game/Screens/Select/PanelGroupRankDisplay.cs | 2 +-
.../Screens/Select/PanelGroupRankedStatus.cs | 2 +-
.../Screens/Select/PanelGroupStarDifficulty.cs | 2 +-
osu.Game/Screens/Select/SongSelect.cs | 2 +-
osu.Game/Skinning/LegacySkinExtensions.cs | 4 ++--
osu.Game/Skinning/LegacyTextureLoaderStore.cs | 2 +-
.../MaxDimensionLimitedTextureLoaderStore.cs | 2 +-
osu.Game/Skinning/SkinProvidingContainer.cs | 5 +++--
osu.Game/Skinning/SkinnableSound.cs | 4 ++--
.../Storyboards/Drawables/DrawableStoryboard.cs | 2 +-
osu.Game/Tests/Beatmaps/HitObjectSampleTest.cs | 4 ++--
.../Tests/Visual/DependencyProvidingContainer.cs | 2 +-
.../Tests/Visual/Metadata/TestMetadataClient.cs | 2 +-
osu.Game/Tests/Visual/OsuTestScene.cs | 4 ++--
osu.Game/Tests/Visual/PlayerTestScene.cs | 2 +-
.../Visual/Spectator/TestSpectatorClient.cs | 2 +-
osu.Game/Utils/TaskChain.cs | 2 +-
osu.Game/osu.Game.csproj | 6 ------
180 files changed, 242 insertions(+), 245 deletions(-)
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformDifficultyCalculator.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformDifficultyCalculator.cs
index 312d3d5e9a64..6205dfd9a312 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformDifficultyCalculator.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformDifficultyCalculator.cs
@@ -26,6 +26,6 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty();
- protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty();
+ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => [];
}
}
diff --git a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
index d7ef84541f32..80c5a195d487 100644
--- a/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
+++ b/Templates/Rulesets/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/EmptyFreeformRuleset.cs
@@ -42,7 +42,7 @@ public override IEnumerable GetModsFor(ModType type)
return new[] { new EmptyFreeformModAutoplay() };
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
index f6addab279e7..3df4d50c4364 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
@@ -26,6 +26,6 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty();
- protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty();
+ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => [];
}
}
diff --git a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
index 2f6ba0dda616..4a609cded856 100644
--- a/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
+++ b/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
@@ -36,7 +36,7 @@ public override IEnumerable GetModsFor(ModType type)
return new[] { new PippidonModAutoplay() };
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingDifficultyCalculator.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingDifficultyCalculator.cs
index a4dc1762d520..7c51d6c10064 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingDifficultyCalculator.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingDifficultyCalculator.cs
@@ -26,6 +26,6 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty();
- protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty();
+ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => [];
}
}
diff --git a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingRuleset.cs b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingRuleset.cs
index a32586c4148e..53e8fb909410 100644
--- a/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingRuleset.cs
+++ b/Templates/Rulesets/ruleset-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/EmptyScrollingRuleset.cs
@@ -35,7 +35,7 @@ public override IEnumerable GetModsFor(ModType type)
return new[] { new EmptyScrollingModAutoplay() };
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
index f6addab279e7..3df4d50c4364 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonDifficultyCalculator.cs
@@ -26,6 +26,6 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate) => Enumerable.Empty();
- protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => Array.Empty();
+ protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate) => [];
}
}
diff --git a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
index bde530feb8bb..582e0bc5b651 100644
--- a/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
+++ b/Templates/Rulesets/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/PippidonRuleset.cs
@@ -33,7 +33,7 @@ public override IEnumerable GetModsFor(ModType type)
return new[] { new PippidonModAutoplay() };
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/osu.Game.Rulesets.Catch.Tests/JuiceStreamPathTest.cs b/osu.Game.Rulesets.Catch.Tests/JuiceStreamPathTest.cs
index 9fb55fc05731..c23a4a607ea1 100644
--- a/osu.Game.Rulesets.Catch.Tests/JuiceStreamPathTest.cs
+++ b/osu.Game.Rulesets.Catch.Tests/JuiceStreamPathTest.cs
@@ -123,7 +123,7 @@ public void TestResampleVertices()
path.Clear();
path.SetVertexPosition(0, 10);
- path.ResampleVertices(Array.Empty());
+ path.ResampleVertices([]);
Assert.That(path.Vertices, Is.EqualTo(new[]
{
new JuiceStreamPathVertex(0, 10)
diff --git a/osu.Game.Rulesets.Catch/CatchRuleset.cs b/osu.Game.Rulesets.Catch/CatchRuleset.cs
index eb8cf137faf7..b5d39c33d6b5 100644
--- a/osu.Game.Rulesets.Catch/CatchRuleset.cs
+++ b/osu.Game.Rulesets.Catch/CatchRuleset.cs
@@ -164,7 +164,7 @@ public override IEnumerable GetModsFor(ModType type)
};
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/osu.Game.Rulesets.Mania.Tests/Editor/ManiaPlacementBlueprintTestScene.cs b/osu.Game.Rulesets.Mania.Tests/Editor/ManiaPlacementBlueprintTestScene.cs
index 83070c3e2913..fe7ffc2155fc 100644
--- a/osu.Game.Rulesets.Mania.Tests/Editor/ManiaPlacementBlueprintTestScene.cs
+++ b/osu.Game.Rulesets.Mania.Tests/Editor/ManiaPlacementBlueprintTestScene.cs
@@ -27,7 +27,7 @@ public abstract partial class ManiaPlacementBlueprintTestScene : PlacementBluepr
private readonly Column column;
[Cached(typeof(IReadOnlyList))]
- private IReadOnlyList mods { get; set; } = Array.Empty();
+ private IReadOnlyList mods { get; set; } = [];
[Cached(typeof(IScrollingInfo))]
private IScrollingInfo scrollingInfo;
diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
index cb9fcca5b026..95bba8249da4 100644
--- a/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
+++ b/osu.Game.Rulesets.Mania.Tests/TestSceneColumn.cs
@@ -25,7 +25,7 @@ namespace osu.Game.Rulesets.Mania.Tests
public partial class TestSceneColumn : ManiaInputTestScene
{
[Cached(typeof(IReadOnlyList))]
- private IReadOnlyList mods { get; set; } = Array.Empty();
+ private IReadOnlyList mods { get; set; } = [];
[Cached]
private readonly StageDefinition stage = new StageDefinition(1);
diff --git a/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs b/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs
index 195365fb18d9..b8af3cc1bd51 100644
--- a/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs
+++ b/osu.Game.Rulesets.Mania.Tests/TestSceneStage.cs
@@ -29,7 +29,7 @@ public partial class TestSceneStage : ManiaInputTestScene
private const int columns = 4;
[Cached(typeof(IReadOnlyList))]
- private IReadOnlyList mods { get; set; } = Array.Empty();
+ private IReadOnlyList mods { get; set; } = [];
private readonly List stages = new List();
diff --git a/osu.Game.Rulesets.Mania/ManiaRuleset.cs b/osu.Game.Rulesets.Mania/ManiaRuleset.cs
index 3fad9d1047b6..46c7e9d5c01e 100644
--- a/osu.Game.Rulesets.Mania/ManiaRuleset.cs
+++ b/osu.Game.Rulesets.Mania/ManiaRuleset.cs
@@ -303,7 +303,7 @@ public override IEnumerable GetModsFor(ModType type)
};
default:
- return Array.Empty();
+ return [];
}
}
@@ -349,7 +349,7 @@ public override IEnumerable GetDefaultKeyBindings(int variant = 0)
return new DualStageVariantGenerator(getDualStageKeyCount(variant)).GenerateMappings();
}
- return Array.Empty();
+ return [];
}
public override LocalisableString GetVariantName(int variant)
diff --git a/osu.Game.Rulesets.Osu.Tests/StackingTest.cs b/osu.Game.Rulesets.Osu.Tests/StackingTest.cs
index 6daf5c59c6aa..939261306d88 100644
--- a/osu.Game.Rulesets.Osu.Tests/StackingTest.cs
+++ b/osu.Game.Rulesets.Osu.Tests/StackingTest.cs
@@ -52,7 +52,7 @@ osu file format v14
using (var reader = new LineBufferedReader(stream))
{
var beatmap = Decoder.GetDecoder(reader).Decode(reader);
- var converted = new TestWorkingBeatmap(beatmap).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, Array.Empty());
+ var converted = new TestWorkingBeatmap(beatmap).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, []);
var objects = converted.HitObjects.ToList();
@@ -97,7 +97,7 @@ osu file format v14
using (var reader = new LineBufferedReader(stream))
{
var beatmap = Decoder.GetDecoder(reader).Decode(reader);
- var converted = new TestWorkingBeatmap(beatmap).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, Array.Empty());
+ var converted = new TestWorkingBeatmap(beatmap).GetPlayableBeatmap(new OsuRuleset().RulesetInfo, []);
var objects = converted.HitObjects.ToList();
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLateFade.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLateFade.cs
index 838b426cb44b..58511ae2ebb7 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLateFade.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneHitCircleLateFade.cs
@@ -86,7 +86,7 @@ public void TestHitCircleNoModMiss()
{
AddStep("Create hit circle", () =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
createCircle();
});
@@ -99,7 +99,7 @@ public void TestHitCircleNoModHit()
{
AddStep("Create hit circle", () =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
createCircle(true);
});
}
@@ -122,7 +122,7 @@ public void TestSliderNoMod()
{
AddStep("Create slider", () =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
createSlider();
});
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs
index b18c77e8ee75..7e06fa1858a1 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSlider.cs
@@ -51,7 +51,7 @@ protected override void LoadComplete()
snakingOut.Value = !v;
});
- AddToggleStep("toggle hidden", hiddenActive => SelectedMods.Value = hiddenActive ? new[] { new OsuModHidden() } : Array.Empty());
+ AddToggleStep("toggle hidden", hiddenActive => SelectedMods.Value = hiddenActive ? new[] { new OsuModHidden() } : []);
AddSliderStep("hit at", 0f, 1f, 0f, v =>
{
diff --git a/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerInput.cs b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerInput.cs
index c4e643dcdfea..6156cfab613f 100644
--- a/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerInput.cs
+++ b/osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerInput.cs
@@ -51,7 +51,7 @@ protected override WorkingBeatmap CreateWorkingBeatmap(IBeatmap beatmap, Storybo
public void Setup() => Schedule(() =>
{
manualClock = null;
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
});
///
diff --git a/osu.Game.Rulesets.Osu/Objects/Spinner.cs b/osu.Game.Rulesets.Osu/Objects/Spinner.cs
index 6f6b848b3811..23ac501981d8 100644
--- a/osu.Game.Rulesets.Osu/Objects/Spinner.cs
+++ b/osu.Game.Rulesets.Osu/Objects/Spinner.cs
@@ -106,7 +106,7 @@ public HitSampleInfo[] CreateSpinningSamples()
var referenceSample = Samples.FirstOrDefault();
if (referenceSample == null)
- return Array.Empty();
+ return [];
return new[]
{
diff --git a/osu.Game.Rulesets.Osu/OsuRuleset.cs b/osu.Game.Rulesets.Osu/OsuRuleset.cs
index f0c4e7441063..0253ff77d350 100644
--- a/osu.Game.Rulesets.Osu/OsuRuleset.cs
+++ b/osu.Game.Rulesets.Osu/OsuRuleset.cs
@@ -230,7 +230,7 @@ public override IEnumerable GetModsFor(ModType type)
};
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/osu.Game.Rulesets.Osu/Skinning/SliderBody.cs b/osu.Game.Rulesets.Osu/Skinning/SliderBody.cs
index e7885e65def7..f874313740d2 100644
--- a/osu.Game.Rulesets.Osu/Skinning/SliderBody.cs
+++ b/osu.Game.Rulesets.Osu/Skinning/SliderBody.cs
@@ -98,7 +98,7 @@ public virtual void RecyclePath()
p.AccentColour = path?.AccentColour ?? Color4.White;
p.BorderColour = path?.BorderColour ?? Color4.White;
p.BorderSize = path?.BorderSize ?? 1;
- p.Vertices = path?.Vertices ?? Array.Empty();
+ p.Vertices = path?.Vertices ?? [];
});
}
diff --git a/osu.Game.Rulesets.Taiko.Tests/Judgements/JudgementTest.cs b/osu.Game.Rulesets.Taiko.Tests/Judgements/JudgementTest.cs
index 30ecec23667e..aeba4f9f4396 100644
--- a/osu.Game.Rulesets.Taiko.Tests/Judgements/JudgementTest.cs
+++ b/osu.Game.Rulesets.Taiko.Tests/Judgements/JudgementTest.cs
@@ -44,7 +44,7 @@ protected void PerformTest(List frames, Beatmap? be
{
Beatmap.Value = CreateWorkingBeatmap(beatmap);
Ruleset.Value = new TaikoRuleset().RulesetInfo;
- SelectedMods.Value = mods ?? Array.Empty();
+ SelectedMods.Value = mods ?? [];
var p = new ScoreAccessibleReplayPlayer(new Score { Replay = new Replay { Frames = frames } });
diff --git a/osu.Game.Rulesets.Taiko/TaikoRuleset.cs b/osu.Game.Rulesets.Taiko/TaikoRuleset.cs
index 686d40ff37da..447f1c52ccbe 100644
--- a/osu.Game.Rulesets.Taiko/TaikoRuleset.cs
+++ b/osu.Game.Rulesets.Taiko/TaikoRuleset.cs
@@ -184,7 +184,7 @@ public override IEnumerable GetModsFor(ModType type)
};
default:
- return Array.Empty();
+ return [];
}
}
diff --git a/osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs b/osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs
index 51875a25d93e..ec98fa032167 100644
--- a/osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs
+++ b/osu.Game.Tests/Beatmaps/Formats/LegacyBeatmapDecoderTest.cs
@@ -45,7 +45,7 @@ public void TestDecodeBeatmapVersion()
ClassicAssert.AreEqual(6, working.Beatmap.BeatmapVersion);
Assert.That(working.Beatmap.BeatmapInfo.Ruleset.Name, Is.Not.EqualTo("null placeholder ruleset"));
- ClassicAssert.AreEqual(6, working.GetPlayableBeatmap(new OsuRuleset().RulesetInfo, Array.Empty()).BeatmapVersion);
+ ClassicAssert.AreEqual(6, working.GetPlayableBeatmap(new OsuRuleset().RulesetInfo, []).BeatmapVersion);
}
}
@@ -61,7 +61,7 @@ public void TestPreviewPointWithOffsets(bool applyOffsets)
var working = new TestWorkingBeatmap(decoder.Decode(stream));
ClassicAssert.AreEqual(4, working.Beatmap.BeatmapVersion);
- ClassicAssert.AreEqual(4, working.GetPlayableBeatmap(new OsuRuleset().RulesetInfo, Array.Empty()).BeatmapVersion);
+ ClassicAssert.AreEqual(4, working.GetPlayableBeatmap(new OsuRuleset().RulesetInfo, []).BeatmapVersion);
ClassicAssert.AreEqual(-1, working.BeatmapInfo.Metadata.PreviewTime);
}
@@ -1212,7 +1212,7 @@ public void TestSpinnerNewComboBetweenObjects([Values("osu", "catch")] string ru
}
var working = new TestWorkingBeatmap(decoder.Decode(stream));
- var playable = working.GetPlayableBeatmap(ruleset.RulesetInfo, Array.Empty());
+ var playable = working.GetPlayableBeatmap(ruleset.RulesetInfo, []);
// There's no good way to figure out these values other than to compare (in code) with osu!stable...
@@ -1255,7 +1255,7 @@ public void TestSliderConversionWithCustomDistance([Values("taiko", "mania")] st
var decoder = Decoder.GetDecoder(stream);
var working = new TestWorkingBeatmap(decoder.Decode(stream));
- IBeatmap beatmap = working.GetPlayableBeatmap(ruleset.RulesetInfo, Array.Empty());
+ IBeatmap beatmap = working.GetPlayableBeatmap(ruleset.RulesetInfo, []);
Assert.That(beatmap.HitObjects[0].GetEndTime(), Is.EqualTo(3153));
}
diff --git a/osu.Game.Tests/Beatmaps/TestSceneBeatmapDifficultyCache.cs b/osu.Game.Tests/Beatmaps/TestSceneBeatmapDifficultyCache.cs
index 42210709b373..8025ace71f4c 100644
--- a/osu.Game.Tests/Beatmaps/TestSceneBeatmapDifficultyCache.cs
+++ b/osu.Game.Tests/Beatmaps/TestSceneBeatmapDifficultyCache.cs
@@ -54,7 +54,7 @@ public void SetUpSteps()
{
AddStep("setup difficulty cache", () =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
Child = difficultyCache = new TestBeatmapDifficultyCache();
diff --git a/osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs b/osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs
index 1f50574619f0..91bd57eb6e55 100644
--- a/osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs
+++ b/osu.Game.Tests/Beatmaps/WorkingBeatmapTest.cs
@@ -45,7 +45,7 @@ public void TestGetPlayableCancellationToken()
Task.Factory.StartNew(() =>
{
loadStarted.Set();
- Assert.Throws(() => working.GetPlayableBeatmap(new OsuRuleset().RulesetInfo, Array.Empty(), cts.Token));
+ Assert.Throws(() => working.GetPlayableBeatmap(new OsuRuleset().RulesetInfo, [], cts.Token));
loadCompleted.Set();
}, TaskCreationOptions.LongRunning);
diff --git a/osu.Game.Tests/Database/RulesetStoreTests.cs b/osu.Game.Tests/Database/RulesetStoreTests.cs
index c8e2a42d8179..627e2ccc1638 100644
--- a/osu.Game.Tests/Database/RulesetStoreTests.cs
+++ b/osu.Game.Tests/Database/RulesetStoreTests.cs
@@ -201,7 +201,7 @@ public override IEnumerable GetModsFor(ModType type)
if (!HasImplementations)
throw new NotImplementedException();
- return Array.Empty();
+ return [];
}
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList? mods = null)
diff --git a/osu.Game.Tests/Editing/Checks/CheckBackgroundQualityTest.cs b/osu.Game.Tests/Editing/Checks/CheckBackgroundQualityTest.cs
index 3d1f7c5b1722..749408ee35a4 100644
--- a/osu.Game.Tests/Editing/Checks/CheckBackgroundQualityTest.cs
+++ b/osu.Game.Tests/Editing/Checks/CheckBackgroundQualityTest.cs
@@ -45,7 +45,7 @@ public void TestMissing()
{
// While this is a problem, it is out of scope for this check and is caught by a different one.
beatmap.Metadata.BackgroundFile = string.Empty;
- var context = getContext(null!, new MemoryStream(Array.Empty()));
+ var context = getContext(null!, new MemoryStream([]));
Assert.That(check.Run(context), Is.Empty);
}
diff --git a/osu.Game.Tests/Editing/Checks/CheckPreviewTimeTest.cs b/osu.Game.Tests/Editing/Checks/CheckPreviewTimeTest.cs
index 7fbe822e8d09..ba1766005720 100644
--- a/osu.Game.Tests/Editing/Checks/CheckPreviewTimeTest.cs
+++ b/osu.Game.Tests/Editing/Checks/CheckPreviewTimeTest.cs
@@ -27,7 +27,7 @@ public void TestPreviewTimeNotSet()
{
// single difficulty with no preview time
var current = createBeatmapWithPreviewPoint(-1, "Current");
- var context = createContext(current, Array.Empty());
+ var context = createContext(current, []);
var issues = check.Run(context).ToList();
diff --git a/osu.Game.Tests/Mods/ModUtilsTest.cs b/osu.Game.Tests/Mods/ModUtilsTest.cs
index b05b4c00b95c..6d8a43a4b0ae 100644
--- a/osu.Game.Tests/Mods/ModUtilsTest.cs
+++ b/osu.Game.Tests/Mods/ModUtilsTest.cs
@@ -205,7 +205,7 @@ public void TestInvalidModScenarios(Mod[] inputMods, Type[] expectedInvalid)
[Test]
public void TestModBelongsToRuleset()
{
- Assert.That(ModUtils.CheckModsBelongToRuleset(new OsuRuleset(), Array.Empty()));
+ Assert.That(ModUtils.CheckModsBelongToRuleset(new OsuRuleset(), []));
Assert.That(ModUtils.CheckModsBelongToRuleset(new OsuRuleset(), new Mod[] { new OsuModDoubleTime() }));
Assert.That(ModUtils.CheckModsBelongToRuleset(new OsuRuleset(), new Mod[] { new OsuModDoubleTime(), new OsuModAccuracyChallenge() }));
Assert.That(ModUtils.CheckModsBelongToRuleset(new OsuRuleset(), new Mod[] { new OsuModDoubleTime(), new ModAccuracyChallenge() }), Is.False);
diff --git a/osu.Game.Tests/Mods/TestCustomisableModRuleset.cs b/osu.Game.Tests/Mods/TestCustomisableModRuleset.cs
index 7df5448ff78e..63c755ad3741 100644
--- a/osu.Game.Tests/Mods/TestCustomisableModRuleset.cs
+++ b/osu.Game.Tests/Mods/TestCustomisableModRuleset.cs
@@ -29,7 +29,7 @@ public override IEnumerable GetModsFor(ModType type)
};
}
- return Array.Empty();
+ return [];
}
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList? mods = null) => throw new NotImplementedException();
diff --git a/osu.Game.Tests/NonVisual/TestSceneTimedDifficultyCalculation.cs b/osu.Game.Tests/NonVisual/TestSceneTimedDifficultyCalculation.cs
index f860cd097a72..19b50ebde0cd 100644
--- a/osu.Game.Tests/NonVisual/TestSceneTimedDifficultyCalculation.cs
+++ b/osu.Game.Tests/NonVisual/TestSceneTimedDifficultyCalculation.cs
@@ -210,7 +210,7 @@ public override void Process(DifficultyHitObject current)
private class TestDifficultyAttributes : DifficultyAttributes
{
- public HitObject[] Objects = Array.Empty();
+ public HitObject[] Objects = [];
}
}
}
diff --git a/osu.Game.Tests/Testing/TestSceneRulesetDependencies.cs b/osu.Game.Tests/Testing/TestSceneRulesetDependencies.cs
index f0a9ce7bebdb..6d2c3645efbf 100644
--- a/osu.Game.Tests/Testing/TestSceneRulesetDependencies.cs
+++ b/osu.Game.Tests/Testing/TestSceneRulesetDependencies.cs
@@ -80,7 +80,7 @@ public TestRuleset()
public override IResourceStore CreateResourceStore() => new NamespacedResourceStore(TestResources.GetStore(), @"Resources");
public override IRulesetConfigManager CreateConfig(SettingsStore? settings) => new TestRulesetConfigManager();
- public override IEnumerable GetModsFor(ModType type) => Array.Empty();
+ public override IEnumerable GetModsFor(ModType type) => [];
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList? mods = null) => null!;
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => null!;
public override DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap) => null!;
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneFailAnimation.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneFailAnimation.cs
index b251253b7c89..5b5fe1d2ae7f 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneFailAnimation.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneFailAnimation.cs
@@ -15,7 +15,7 @@ public partial class TestSceneFailAnimation : TestSceneAllRulesetPlayers
{
protected override Player CreatePlayer(Ruleset ruleset)
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
return new FailPlayer();
}
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneFailJudgement.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneFailJudgement.cs
index 6297b062dd0f..af5b0f817781 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneFailJudgement.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneFailJudgement.cs
@@ -15,7 +15,7 @@ public partial class TestSceneFailJudgement : TestSceneAllRulesetPlayers
{
protected override Player CreatePlayer(Ruleset ruleset)
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
return new FailPlayer();
}
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneHUDOverlay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneHUDOverlay.cs
index 1e6e0007b555..ca072427b5f7 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneHUDOverlay.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneHUDOverlay.cs
@@ -270,7 +270,7 @@ private void createNew(Action? action = null)
{
AddStep("create overlay", () =>
{
- hudOverlay = new HUDOverlay(null, Array.Empty(), new PlayerConfiguration());
+ hudOverlay = new HUDOverlay(null, [], new PlayerConfiguration());
// Add any key just to display the key counter visually.
hudOverlay.InputCountController.Add(new KeyCounterKeyboardTrigger(Key.Space));
diff --git a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerMaxDimensions.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerMaxDimensions.cs
index 3f78dedec547..d39c8bfbc811 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerMaxDimensions.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerMaxDimensions.cs
@@ -132,7 +132,7 @@ private TextureUpload upscale(TextureUpload textureUpload)
public Stream? GetStream(string name) => textureStore?.GetStream(name);
- public IEnumerable GetAvailableResources() => textureStore?.GetAvailableResources() ?? Array.Empty();
+ public IEnumerable GetAvailableResources() => textureStore?.GetAvailableResources() ?? [];
}
}
}
diff --git a/osu.Game.Tests/Visual/Gameplay/TestScenePoolingRuleset.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePoolingRuleset.cs
index b567e8de8d88..2dffb9f0d3d2 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestScenePoolingRuleset.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestScenePoolingRuleset.cs
@@ -474,7 +474,7 @@ public override void OnKilled()
private class TestHitObjectWithNested : TestHitObject
{
- public IEnumerable NestedObjects { get; init; } = Array.Empty();
+ public IEnumerable NestedObjects { get; init; } = [];
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
{
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneReplay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneReplay.cs
index 94a25d064c17..bf6f6ec6c6de 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneReplay.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneReplay.cs
@@ -19,9 +19,9 @@ public partial class TestSceneReplay : TestSceneAllRulesetPlayers
{
protected override Player CreatePlayer(Ruleset ruleset)
{
- var beatmap = Beatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo, Array.Empty());
+ var beatmap = Beatmap.Value.GetPlayableBeatmap(ruleset.RulesetInfo, []);
- return new ScoreAccessibleReplayPlayer(ruleset.GetAutoplayMod()?.CreateScoreFromReplayData(beatmap, Array.Empty()));
+ return new ScoreAccessibleReplayPlayer(ruleset.GetAutoplayMod()?.CreateScoreFromReplayData(beatmap, []));
}
protected override void AddCheckSteps()
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneScrollingHitObjects.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneScrollingHitObjects.cs
index 317d01553a50..af225a31a3f7 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneScrollingHitObjects.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneScrollingHitObjects.cs
@@ -32,7 +32,7 @@ namespace osu.Game.Tests.Visual.Gameplay
public partial class TestSceneScrollingHitObjects : OsuTestScene
{
[Cached(typeof(IReadOnlyList))]
- private IReadOnlyList mods { get; set; } = Array.Empty();
+ private IReadOnlyList mods { get; set; } = [];
private const int time_range = 5000;
private const int spawn_rate = time_range / 10;
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableHUDOverlay.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableHUDOverlay.cs
index e42e8f994e15..19e11defa587 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableHUDOverlay.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSkinnableHUDOverlay.cs
@@ -96,7 +96,7 @@ private void createNew(Action action = null)
{
SetContents(_ =>
{
- hudOverlay = new HUDOverlay(new DrawableOsuRuleset(new OsuRuleset(), new OsuBeatmap()), Array.Empty(), new PlayerConfiguration());
+ hudOverlay = new HUDOverlay(new DrawableOsuRuleset(new OsuRuleset(), new OsuBeatmap()), [], new PlayerConfiguration());
action?.Invoke(hudOverlay);
diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs
index 11dc0f9c30ff..ac54c9585396 100644
--- a/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs
+++ b/osu.Game.Tests/Visual/Gameplay/TestSceneStoryboardSamplePlayback.cs
@@ -45,7 +45,7 @@ private void load(OsuConfigManager config)
}
[SetUp]
- public void SetUp() => storyboardMods = Array.Empty();
+ public void SetUp() => storyboardMods = [];
[Test]
public void TestStoryboardSamplesStopDuringPause()
diff --git a/osu.Game.Tests/Visual/Matchmaking/TestSceneBeatmapSelectGrid.cs b/osu.Game.Tests/Visual/Matchmaking/TestSceneBeatmapSelectGrid.cs
index 79ee4886a9d5..660c8b66427a 100644
--- a/osu.Game.Tests/Visual/Matchmaking/TestSceneBeatmapSelectGrid.cs
+++ b/osu.Game.Tests/Visual/Matchmaking/TestSceneBeatmapSelectGrid.cs
@@ -53,7 +53,7 @@ private void load()
StarRating = i / 10.0,
},
CreateAPIBeatmap(beatmap),
- Array.Empty()
+ []
);
});
}
@@ -67,7 +67,7 @@ private void load()
StarRating = i / 10.0,
},
CreateAPIBeatmap(),
- Array.Empty()
+ []
));
}
diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiSpectatorScreen.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiSpectatorScreen.cs
index 0a042d189d22..3bdd83414351 100644
--- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiSpectatorScreen.cs
+++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiSpectatorScreen.cs
@@ -555,7 +555,7 @@ private void start(int[] userIds, int? beatmapId = null, APIMod[]? mods = null,
var user = new MultiplayerRoomUser(id)
{
User = new APIUser { Id = id },
- Mods = mods ?? Array.Empty(),
+ Mods = mods ?? [],
MatchState = teams ? new TeamVersusUserState { TeamID = i % 2 } : null,
};
diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerMatchSongSelect.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerMatchSongSelect.cs
index b9f2d32cf391..42d1a0c4b982 100644
--- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerMatchSongSelect.cs
+++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerMatchSongSelect.cs
@@ -95,7 +95,7 @@ public void TestSelectFreeMods()
AddStep("set some freemods", () => songSelect.FreeMods.Value = new OsuRuleset().GetModsFor(ModType.Fun).ToArray());
AddStep("set all freemods", () => songSelect.FreeMods.Value = new OsuRuleset().CreateAllMods().ToArray());
- AddStep("set no freemods", () => songSelect.FreeMods.Value = Array.Empty());
+ AddStep("set no freemods", () => songSelect.FreeMods.Value = []);
}
[Test]
diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerMatchSubScreen.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerMatchSubScreen.cs
index 906cb3436c11..b1016e017350 100644
--- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerMatchSubScreen.cs
+++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerMatchSubScreen.cs
@@ -392,7 +392,7 @@ public void TestUserModSelectUpdatesWhenNotVisible()
AllowedMods = []
})));
// This would normally be done as part of the above operation with an actual server.
- AddStep("disable user mods", () => MultiplayerClient.ChangeUserMods(API.LocalUser.Value.OnlineID, Array.Empty()));
+ AddStep("disable user mods", () => MultiplayerClient.ChangeUserMods(API.LocalUser.Value.OnlineID, Array.Empty()));
AddUntilStep("flashlight mod disabled", () => !MultiplayerClient.ClientRoom!.Users[0].Mods.Any());
AddStep("re-enable allowed mods", () => MultiplayerClient.EditPlaylistItem(new MultiplayerPlaylistItem(new PlaylistItem(MultiplayerClient.ServerRoom!.Playlist[0])
{
diff --git a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerPlayer.cs b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerPlayer.cs
index 99bec1e71414..0e8e8b3cbd17 100644
--- a/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerPlayer.cs
+++ b/osu.Game.Tests/Visual/Multiplayer/TestSceneMultiplayerPlayer.cs
@@ -59,7 +59,7 @@ private void setup(Func>? mods = null)
AddStep("set beatmap", () =>
{
Beatmap.Value = CreateWorkingBeatmap(new OsuRuleset().RulesetInfo);
- SelectedMods.Value = mods?.Invoke() ?? Array.Empty();
+ SelectedMods.Value = mods?.Invoke() ?? [];
});
AddStep("Start track playing", () =>
diff --git a/osu.Game.Tests/Visual/Multiplayer/TestScenePlaylistsSongSelect.cs b/osu.Game.Tests/Visual/Multiplayer/TestScenePlaylistsSongSelect.cs
index 87c1b67ba7d7..5810b85b2cad 100644
--- a/osu.Game.Tests/Visual/Multiplayer/TestScenePlaylistsSongSelect.cs
+++ b/osu.Game.Tests/Visual/Multiplayer/TestScenePlaylistsSongSelect.cs
@@ -62,7 +62,7 @@ public override void SetUpSteps()
room = new Room();
Ruleset.Value = new OsuRuleset().RulesetInfo;
Beatmap.SetDefault();
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
});
AddStep("create song select", () => LoadScreen(songSelect = new TestPlaylistsSongSelect(room)));
diff --git a/osu.Game.Tests/Visual/Online/TestSceneAdvancedStats.cs b/osu.Game.Tests/Visual/Online/TestSceneAdvancedStats.cs
index 2ceb8ff0be55..5f93b60942ea 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneAdvancedStats.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneAdvancedStats.cs
@@ -61,7 +61,7 @@ public void TestNoMod()
advancedStats.Ruleset.Value = exampleBeatmapInfo.Ruleset;
});
- AddStep("no mods selected", () => SelectedMods.Value = Array.Empty());
+ AddStep("no mods selected", () => SelectedMods.Value = []);
AddAssert("first bar text is correct", () => advancedStats.GetStatistic(SongSelectStrings.CircleSize), () => Is.Not.Null);
AddAssert("circle size bar is white", () => barIsWhite(advancedStats.GetStatistic(SongSelectStrings.CircleSize)));
diff --git a/osu.Game.Tests/Visual/Online/TestSceneBeatmapListingOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapListingOverlay.cs
index 8691f46605d0..c3766a19b74d 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneBeatmapListingOverlay.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapListingOverlay.cs
@@ -229,7 +229,7 @@ public void TestUserWithoutSupporterUsesSupporterOnlyFiltersWithoutResults()
setRankAchievedFilter(new[] { ScoreRank.XH });
supporterRequiredPlaceholderShown();
- setRankAchievedFilter(Array.Empty());
+ setRankAchievedFilter([]);
notFoundPlaceholderShown();
// only Played filter
@@ -244,7 +244,7 @@ public void TestUserWithoutSupporterUsesSupporterOnlyFiltersWithoutResults()
setPlayedFilter(SearchPlayed.Played);
supporterRequiredPlaceholderShown();
- setRankAchievedFilter(Array.Empty());
+ setRankAchievedFilter([]);
setPlayedFilter(SearchPlayed.Any);
notFoundPlaceholderShown();
}
@@ -259,7 +259,7 @@ public void TestUserWithSupporterUsesSupporterOnlyFiltersWithoutResults()
setRankAchievedFilter(new[] { ScoreRank.XH });
notFoundPlaceholderShown();
- setRankAchievedFilter(Array.Empty());
+ setRankAchievedFilter([]);
notFoundPlaceholderShown();
// only Played filter
@@ -274,7 +274,7 @@ public void TestUserWithSupporterUsesSupporterOnlyFiltersWithoutResults()
setPlayedFilter(SearchPlayed.Played);
notFoundPlaceholderShown();
- setRankAchievedFilter(Array.Empty());
+ setRankAchievedFilter([]);
setPlayedFilter(SearchPlayed.Any);
notFoundPlaceholderShown();
}
@@ -292,7 +292,7 @@ public void TestUserWithoutSupporterUsesSupporterOnlyFiltersWithResults()
setRankAchievedFilter(new[] { ScoreRank.XH });
supporterRequiredPlaceholderShown();
- setRankAchievedFilter(Array.Empty());
+ setRankAchievedFilter([]);
noPlaceholderShown();
// only Played filter
@@ -307,7 +307,7 @@ public void TestUserWithoutSupporterUsesSupporterOnlyFiltersWithResults()
setPlayedFilter(SearchPlayed.Played);
supporterRequiredPlaceholderShown();
- setRankAchievedFilter(Array.Empty());
+ setRankAchievedFilter([]);
setPlayedFilter(SearchPlayed.Any);
noPlaceholderShown();
}
@@ -325,7 +325,7 @@ public void TestUserWithSupporterUsesSupporterOnlyFiltersWithResults()
setRankAchievedFilter(new[] { ScoreRank.XH });
noPlaceholderShown();
- setRankAchievedFilter(Array.Empty());
+ setRankAchievedFilter([]);
noPlaceholderShown();
// only Played filter
@@ -340,7 +340,7 @@ public void TestUserWithSupporterUsesSupporterOnlyFiltersWithResults()
setPlayedFilter(SearchPlayed.Played);
noPlaceholderShown();
- setRankAchievedFilter(Array.Empty());
+ setRankAchievedFilter([]);
setPlayedFilter(SearchPlayed.Any);
noPlaceholderShown();
}
diff --git a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs
index 9f7930d09ae3..01d7e006ba89 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapSetOverlay.cs
@@ -41,7 +41,7 @@ public TestSceneBeatmapSetOverlay()
private IRulesetStore rulesets { get; set; } = null!;
[SetUp]
- public void SetUp() => Schedule(() => SelectedMods.Value = Array.Empty());
+ public void SetUp() => Schedule(() => SelectedMods.Value = []);
[Test]
public void TestLoading()
diff --git a/osu.Game.Tests/Visual/Online/TestSceneDrawableComment.cs b/osu.Game.Tests/Visual/Online/TestSceneDrawableComment.cs
index 5cdf79160c6a..1f9d6dcbb16d 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneDrawableComment.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneDrawableComment.cs
@@ -46,7 +46,7 @@ public TestSceneDrawableComment()
return new[]
{
- new DrawableComment(comment, Array.Empty()),
+ new DrawableComment(comment, []),
new DrawableComment(comment, new[]
{
new CommentableMeta
diff --git a/osu.Game.Tests/Visual/Online/TestSceneGraph.cs b/osu.Game.Tests/Visual/Online/TestSceneGraph.cs
index f4bde159e5e2..bbc335909282 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneGraph.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneGraph.cs
@@ -29,7 +29,7 @@ public TestSceneGraph()
AddStep("small values", () => graph.Values = Enumerable.Range(1, 10).Select(i => i * 0.01f).Concat(new[] { 100f }));
AddStep("values from 1-100", () => graph.Values = Enumerable.Range(1, 100).Select(i => (float)i));
AddStep("reversed values from 1-10", () => graph.Values = Enumerable.Range(1, 10).Reverse().Select(i => (float)i));
- AddStep("empty values", () => graph.Values = Array.Empty());
+ AddStep("empty values", () => graph.Values = []);
AddStep("Bottom to top", () => graph.Direction = BarDirection.BottomToTop);
AddStep("Top to bottom", () => graph.Direction = BarDirection.TopToBottom);
AddStep("Left to right", () => graph.Direction = BarDirection.LeftToRight);
diff --git a/osu.Game.Tests/Visual/Online/TestSceneNewsSidebar.cs b/osu.Game.Tests/Visual/Online/TestSceneNewsSidebar.cs
index ce5fc888aac0..1745c69e1418 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneNewsSidebar.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneNewsSidebar.cs
@@ -140,7 +140,7 @@ public void TestYearsPanelVisibility()
2014,
2013
},
- NewsPosts = Array.Empty()
+ NewsPosts = []
};
// see https://osu.ppy.sh/docs/index.html#get-news-listing:
diff --git a/osu.Game.Tests/Visual/Online/TestScenePlayHistorySubsection.cs b/osu.Game.Tests/Visual/Online/TestScenePlayHistorySubsection.cs
index 106433d7ce03..9243ec9c973a 100644
--- a/osu.Game.Tests/Visual/Online/TestScenePlayHistorySubsection.cs
+++ b/osu.Game.Tests/Visual/Online/TestScenePlayHistorySubsection.cs
@@ -110,7 +110,7 @@ public void TestMissingValues()
private static readonly APIUser user_with_empty_values = new APIUser
{
Id = 2,
- MonthlyPlayCounts = Array.Empty()
+ MonthlyPlayCounts = []
};
private static readonly APIUser user_with_one_value = new APIUser
diff --git a/osu.Game.Tests/Visual/Online/TestSceneUserHistoryGraph.cs b/osu.Game.Tests/Visual/Online/TestSceneUserHistoryGraph.cs
index 454242270da7..073a87d75b69 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneUserHistoryGraph.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneUserHistoryGraph.cs
@@ -50,7 +50,7 @@ public TestSceneUserHistoryGraph()
AddStep("Set fake values", () => graph.Values = values);
AddStep("Set more values", () => graph.Values = moreValues);
AddStep("Set null values", () => graph.Values = null);
- AddStep("Set empty values", () => graph.Values = Array.Empty());
+ AddStep("Set empty values", () => graph.Values = []);
}
}
}
diff --git a/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs b/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs
index fd40deab28a8..0d1d581c5f75 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneUserProfileOverlay.cs
@@ -334,7 +334,7 @@ public void TestCustomColourSchemeWithReload()
},
Title = "osu!volunteer",
Colour = "ff0000",
- Achievements = Array.Empty(),
+ Achievements = [],
PlayMode = "osu",
Kudosu = new APIUser.KudosuCount
{
diff --git a/osu.Game.Tests/Visual/Online/TestSceneUserProfilePreviousUsernamesDisplay.cs b/osu.Game.Tests/Visual/Online/TestSceneUserProfilePreviousUsernamesDisplay.cs
index c1140f60afb9..fad1c55e6a75 100644
--- a/osu.Game.Tests/Visual/Online/TestSceneUserProfilePreviousUsernamesDisplay.cs
+++ b/osu.Game.Tests/Visual/Online/TestSceneUserProfilePreviousUsernamesDisplay.cs
@@ -63,7 +63,7 @@ public void TestVisibility()
new APIUser { Id = 2, PreviousUsernames = new[] { "longusername", "longerusername" } },
new APIUser { Id = 3, PreviousUsernames = new[] { "test", "angelsim", "verylongusername" } },
new APIUser { Id = 4, PreviousUsernames = new[] { "ihavenoidea", "howcani", "makethistext", "anylonger" } },
- new APIUser { Id = 5, PreviousUsernames = Array.Empty() },
+ new APIUser { Id = 5, PreviousUsernames = [] },
null
};
}
diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapLeaderboardWedge.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapLeaderboardWedge.cs
index c6d6339c98c9..4d822805373c 100644
--- a/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapLeaderboardWedge.cs
+++ b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapLeaderboardWedge.cs
@@ -134,7 +134,7 @@ public void TestPersonalBestWithNullPosition()
[Test]
public void TestPlaceholderStates()
{
- AddStep("ensure no scores displayed", () => leaderboard.SetScores(Array.Empty()));
+ AddStep("ensure no scores displayed", () => leaderboard.SetScores([]));
AddStep(@"Retrieving", () => leaderboard.SetState(LeaderboardState.Retrieving));
AddStep(@"Network failure", () => leaderboard.SetState(LeaderboardState.NetworkFailure));
diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapMetadataWedge.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapMetadataWedge.cs
index 769d6bb8f864..a0f1e3abb351 100644
--- a/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapMetadataWedge.cs
+++ b/osu.Game.Tests/Visual/SongSelect/TestSceneBeatmapMetadataWedge.cs
@@ -72,7 +72,7 @@ public void TestVariousMetrics()
{
var (working, online) = createTestBeatmap();
- online.Result!.Ratings = Array.Empty();
+ online.Result!.Ratings = [];
Beatmap.Value = working;
onlineLookupResult.Value = online;
@@ -90,7 +90,7 @@ public void TestVariousMetrics()
{
var (working, online) = createTestBeatmap();
- online.Result!.Ratings = Array.Empty();
+ online.Result!.Ratings = [];
online.Result!.Beatmaps.Single().FailTimes = null;
Beatmap.Value = working;
diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneDifficultyStatisticsDisplay.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneDifficultyStatisticsDisplay.cs
index 5b15add2ad08..bad4787a78cb 100644
--- a/osu.Game.Tests/Visual/SongSelect/TestSceneDifficultyStatisticsDisplay.cs
+++ b/osu.Game.Tests/Visual/SongSelect/TestSceneDifficultyStatisticsDisplay.cs
@@ -65,7 +65,7 @@ public void SetUpSteps()
[Test]
public void TestEmpty()
{
- AddStep("set empty", () => display.Statistics = Array.Empty());
+ AddStep("set empty", () => display.Statistics = []);
AddAssert("no statistics", () => !display.ChildrenOfType().Any());
AddAssert("no tiny statistics", () => !display.ChildrenOfType().Single().Content.Any());
}
diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneFooterButtonMods.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneFooterButtonMods.cs
index 08d02015a29d..e7dfcb6bd119 100644
--- a/osu.Game.Tests/Visual/SongSelect/TestSceneFooterButtonMods.cs
+++ b/osu.Game.Tests/Visual/SongSelect/TestSceneFooterButtonMods.cs
@@ -51,11 +51,11 @@ public void TestDisplay()
AddStep("modified + five", () => changeMods(new List { new OsuModHidden(), new OsuModHardRock(), new OsuModDoubleTime { SpeedChange = { Value = 1.2 } }, new OsuModClassic(), new OsuModDifficultyAdjust(), new OsuModRandom() }));
AddStep("modified + six", () => changeMods(new List { new OsuModHidden(), new OsuModHardRock(), new OsuModDoubleTime { SpeedChange = { Value = 1.2 } }, new OsuModClassic(), new OsuModDifficultyAdjust(), new OsuModRandom(), new OsuModAlternate() }));
- AddStep("clear mods", () => changeMods(Array.Empty()));
+ AddStep("clear mods", () => changeMods([]));
AddWaitStep("wait", 3);
AddStep("one mod", () => changeMods(new List { new OsuModHidden() }));
- AddStep("clear mods", () => changeMods(Array.Empty()));
+ AddStep("clear mods", () => changeMods([]));
AddWaitStep("wait", 3);
AddStep("five mods", () => changeMods(new List { new OsuModHidden(), new OsuModHardRock(), new OsuModDoubleTime(), new OsuModClassic(), new OsuModDifficultyAdjust() }));
}
@@ -101,7 +101,7 @@ public void TestUnrankedBadge()
{
AddStep(@"Add unranked mod", () => changeMods(new[] { new OsuModDeflate() }));
AddUntilStep("Unranked badge shown", () => footerButtonMods.ChildrenOfType().Single().Alpha == 1);
- AddStep(@"Clear selected mod", () => changeMods(Array.Empty()));
+ AddStep(@"Clear selected mod", () => changeMods([]));
AddUntilStep("Unranked badge not shown", () => footerButtonMods.ChildrenOfType().Single().Alpha == 0);
}
diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelect.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelect.cs
index 6eddc8e1d858..896bedfbf6bb 100644
--- a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelect.cs
+++ b/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelect.cs
@@ -186,7 +186,7 @@ public void TestClearModsViaModButtonRightClick()
public void TestSpeedChange()
{
LoadSongSelect();
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
decreaseModSpeed();
AddAssert("half time activated at 0.95x", () => SelectedMods.Value.OfType().Single().SpeedChange.Value, () => Is.EqualTo(0.95).Within(0.005));
@@ -454,11 +454,11 @@ public void TestFooterMods()
() => SelectedMods.Value = new List
{ new OsuModHidden(), new OsuModHardRock(), new OsuModClassic(), new OsuModDifficultyAdjust(), new OsuModDoubleTime { SpeedChange = { Value = 1.2 } } });
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
AddWaitStep("wait", 3);
AddStep("one mod", () => SelectedMods.Value = new List { new OsuModHidden() });
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
AddWaitStep("wait", 3);
AddStep("five mods", () => SelectedMods.Value = new List { new OsuModHidden(), new OsuModHardRock(), new OsuModDoubleTime(), new OsuModClassic(), new OsuModDifficultyAdjust() });
}
diff --git a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFiltering.cs b/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFiltering.cs
index a479a286573c..cbada1fdba89 100644
--- a/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFiltering.cs
+++ b/osu.Game.Tests/Visual/SongSelect/TestSceneSongSelectFiltering.cs
@@ -180,7 +180,7 @@ public void TestNonFilterableModChange()
AddAssert("filter count is 0", () => filterOperationsCount, () => Is.EqualTo(0));
// Removing the mod should still not re-filter.
- AddStep("remove non-filterable mod", () => SelectedMods.Value = Array.Empty());
+ AddStep("remove non-filterable mod", () => SelectedMods.Value = []);
AddAssert("filter count is 0", () => filterOperationsCount, () => Is.EqualTo(0));
}
@@ -216,7 +216,7 @@ public void TestFilterableModChange()
AddAssert("filter count is 4", () => filterOperationsCount, () => Is.EqualTo(4));
// Remove non-filterable mod. Should NOT re-filter.
- AddStep("remove non-filterable mod", () => SelectedMods.Value = Array.Empty());
+ AddStep("remove non-filterable mod", () => SelectedMods.Value = []);
AddAssert("filter count is 4", () => filterOperationsCount, () => Is.EqualTo(4));
// Add filterable mod. Should re-filter.
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneBeatmapAttributeText.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneBeatmapAttributeText.cs
index 5acd6cb0847b..6348ccdff348 100644
--- a/osu.Game.Tests/Visual/UserInterface/TestSceneBeatmapAttributeText.cs
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneBeatmapAttributeText.cs
@@ -212,10 +212,10 @@ protected override DifficultyAttributes CreateDifficultyAttributes(IBeatmap beat
=> new DifficultyAttributes(mods, mods.OfType().SingleOrDefault()?.Difficulty.Value ?? 0);
protected override IEnumerable CreateDifficultyHitObjects(IBeatmap beatmap, double clockRate)
- => Array.Empty();
+ => [];
protected override Skill[] CreateSkills(IBeatmap beatmap, Mod[] mods, double clockRate)
- => Array.Empty();
+ => [];
}
private class TestPerformanceCalculator : PerformanceCalculator
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModCustomisationPanel.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModCustomisationPanel.cs
index 04cb12963024..a9a818dac9cd 100644
--- a/osu.Game.Tests/Visual/UserInterface/TestSceneModCustomisationPanel.cs
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModCustomisationPanel.cs
@@ -31,7 +31,7 @@ public partial class TestSceneModCustomisationPanel : OsuManualInputManagerTestS
[SetUp]
public void SetUp() => Schedule(() =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
InputManager.MoveMouseTo(Vector2.One);
Child = new Container
@@ -75,7 +75,7 @@ public void TestDisplay()
});
AddStep("set empty", () =>
{
- SelectedMods.Value = Array.Empty();
+ SelectedMods.Value = [];
panel.Enabled.Value = false;
panel.ExpandedState.Value = ModCustomisationPanel.ModCustomisationPanelState.Collapsed;
});
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModPanel.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModPanel.cs
index 64bdc167c217..c39474743e00 100644
--- a/osu.Game.Tests/Visual/UserInterface/TestSceneModPanel.cs
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModPanel.cs
@@ -62,7 +62,7 @@ public void TestIncompatibilityDisplay()
panel.Active.BindValueChanged(active =>
{
SelectedMods.Value = active.NewValue
- ? Array.Empty()
+ ? []
: new[] { panel.Mod };
});
});
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetColumn.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetColumn.cs
index cc2817cecf0f..387d904335e9 100644
--- a/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetColumn.cs
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetColumn.cs
@@ -163,7 +163,7 @@ public void TestBasicOperation()
public void TestSoftDeleteSupport()
{
AddStep("set osu! ruleset", () => Ruleset.Value = rulesets.GetRuleset(0));
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
AddStep("create content", () => Child = new ModPresetColumn
{
Anchor = Anchor.Centre,
@@ -200,7 +200,7 @@ public void TestAddingFlow([Values] bool withSystemModActive)
{
ModPresetColumn modPresetColumn = null!;
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
AddStep("create content", () => Child = modPresetColumn = new ModPresetColumn
{
Anchor = Anchor.Centre,
@@ -255,7 +255,7 @@ public void TestAddingFlow([Values] bool withSystemModActive)
});
AddUntilStep("wait for popover", () => (popover = this.ChildrenOfType().FirstOrDefault()) != null);
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
AddUntilStep("popover closed", () => !this.ChildrenOfType().Any());
}
@@ -306,7 +306,7 @@ public void TestEditPresetName()
string presetName = null!;
ModPresetPanel panel = null!;
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
AddStep("create content", () => Child = modPresetColumn = new ModPresetColumn
{
Anchor = Anchor.Centre,
@@ -355,7 +355,7 @@ public void TestEditPresetMod()
var mods = new Mod[] { new OsuModHidden(), new OsuModHardRock() };
List previousMod = null!;
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
AddStep("create content", () => Child = modPresetColumn = new ModPresetColumn
{
Anchor = Anchor.Centre,
@@ -432,7 +432,7 @@ public void TestTextFiltering()
{
ModPresetColumn modPresetColumn = null!;
- AddStep("clear mods", () => SelectedMods.Value = Array.Empty());
+ AddStep("clear mods", () => SelectedMods.Value = []);
AddStep("create content", () => Child = modPresetColumn = new ModPresetColumn
{
Anchor = Anchor.Centre,
diff --git a/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetPanel.cs b/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetPanel.cs
index f87d8e0d2b38..bfeaf3baf132 100644
--- a/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetPanel.cs
+++ b/osu.Game.Tests/Visual/UserInterface/TestSceneModPresetPanel.cs
@@ -108,7 +108,7 @@ public void TestActivatingPresetTogglesIncludedMods()
assertSelectedModsEquivalentTo(new Mod[] { new OsuModHardRock(), new OsuModDoubleTime() });
AddStep("deactivate panel", () => panel.AsNonNull().TriggerClick());
- assertSelectedModsEquivalentTo(Array.Empty());
+ assertSelectedModsEquivalentTo([]);
AddStep("set different mod", () => SelectedMods.Value = new[] { new OsuModHidden() });
AddStep("activate panel", () => panel.AsNonNull().TriggerClick());
@@ -151,7 +151,7 @@ public void TestSystemModsNotPreservedIfIncompatibleWithPresetMods()
assertSelectedModsEquivalentTo(new Mod[] { new OsuModAutopilot() });
AddStep("deactivate panel", () => panel.AsNonNull().TriggerClick());
- assertSelectedModsEquivalentTo(Array.Empty());
+ assertSelectedModsEquivalentTo([]);
// just for test purposes, can't/shouldn't happen in reality
AddStep("Add score v2 to selected mod", () => SelectedMods.Value = new Mod[] { new ModScoreV2() });
diff --git a/osu.Game.Tournament/Screens/Ladder/Components/DrawableMatchTeam.cs b/osu.Game.Tournament/Screens/Ladder/Components/DrawableMatchTeam.cs
index 637591c6f6f7..2de9ee7ddc1c 100644
--- a/osu.Game.Tournament/Screens/Ladder/Components/DrawableMatchTeam.cs
+++ b/osu.Game.Tournament/Screens/Ladder/Components/DrawableMatchTeam.cs
@@ -191,7 +191,7 @@ public MenuItem[] ContextMenuItems
get
{
if (editorInfo == null)
- return Array.Empty
-
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/osu.Game/Beatmaps/APIFailTimes.cs b/osu.Game/Beatmaps/APIFailTimes.cs
index 09ab16598d01..2d87233255b1 100644
--- a/osu.Game/Beatmaps/APIFailTimes.cs
+++ b/osu.Game/Beatmaps/APIFailTimes.cs
@@ -15,12 +15,12 @@ public class APIFailTimes
/// Points of failure on a relative time scale (usually 0..100).
///
[JsonProperty(@"fail")]
- public int[]? Fails { get; set; } = Array.Empty();
+ public int[]? Fails { get; set; } = [];
///
/// Points of retry on a relative time scale (usually 0..100).
///
[JsonProperty(@"exit")]
- public int[]? Retries { get; set; } = Array.Empty();
+ public int[]? Retries { get; set; } = [];
}
}
diff --git a/osu.Game/Beatmaps/Beatmap.cs b/osu.Game/Beatmaps/Beatmap.cs
index c728f243684c..99034fc4aa35 100644
--- a/osu.Game/Beatmaps/Beatmap.cs
+++ b/osu.Game/Beatmaps/Beatmap.cs
@@ -146,7 +146,7 @@ public double GetMostCommonBeatLength()
public int CountdownOffset { get; set; }
- public int[] Bookmarks { get; set; } = Array.Empty();
+ public int[] Bookmarks { get; set; } = [];
public int BeatmapVersion { get; set; } = LegacyBeatmapEncoder.FIRST_LAZER_VERSION;
diff --git a/osu.Game/Beatmaps/BeatmapDifficultyCache.cs b/osu.Game/Beatmaps/BeatmapDifficultyCache.cs
index d6b40639161e..83eb61f1792d 100644
--- a/osu.Game/Beatmaps/BeatmapDifficultyCache.cs
+++ b/osu.Game/Beatmaps/BeatmapDifficultyCache.cs
@@ -51,7 +51,7 @@ public partial class BeatmapDifficultyCache : MemoryCachingComponent
/// Lock to be held when operating on or .
///
- private readonly object bindableUpdateLock = new object();
+ private readonly Lock bindableUpdateLock = new Lock();
private CancellationTokenSource trackedUpdateCancellationSource = new CancellationTokenSource();
@@ -356,7 +356,7 @@ public DifficultyCacheLookup(BeatmapInfo beatmapInfo, RulesetInfo? ruleset, IEnu
BeatmapInfo = beatmapInfo;
// In the case that the user hasn't given us a ruleset, use the beatmap's default ruleset.
Ruleset = ruleset ?? BeatmapInfo.Ruleset;
- OrderedMods = mods?.OrderBy(m => m.Acronym).Select(mod => mod.DeepClone()).ToArray() ?? Array.Empty();
+ OrderedMods = mods?.OrderBy(m => m.Acronym).Select(mod => mod.DeepClone()).ToArray() ?? [];
}
public bool Equals(DifficultyCacheLookup other)
diff --git a/osu.Game/Beatmaps/BeatmapPanelBackgroundTextureLoaderStore.cs b/osu.Game/Beatmaps/BeatmapPanelBackgroundTextureLoaderStore.cs
index cf58ae73fe1f..538a646d51b9 100644
--- a/osu.Game/Beatmaps/BeatmapPanelBackgroundTextureLoaderStore.cs
+++ b/osu.Game/Beatmaps/BeatmapPanelBackgroundTextureLoaderStore.cs
@@ -90,6 +90,6 @@ private TextureUpload limitTextureUploadSize(TextureUpload textureUpload)
public Stream? GetStream(string name) => textureStore?.GetStream(name);
- public IEnumerable GetAvailableResources() => textureStore?.GetAvailableResources() ?? Array.Empty();
+ public IEnumerable GetAvailableResources() => textureStore?.GetAvailableResources() ?? [];
}
}
diff --git a/osu.Game/Beatmaps/DummyWorkingBeatmap.cs b/osu.Game/Beatmaps/DummyWorkingBeatmap.cs
index 5dc73d8679e0..45a9c85b09e0 100644
--- a/osu.Game/Beatmaps/DummyWorkingBeatmap.cs
+++ b/osu.Game/Beatmaps/DummyWorkingBeatmap.cs
@@ -63,7 +63,7 @@ public DummyWorkingBeatmap([NotNull] AudioManager audio, TextureStore textures)
private class DummyRuleset : Ruleset
{
- public override IEnumerable GetModsFor(ModType type) => Array.Empty();
+ public override IEnumerable GetModsFor(ModType type) => [];
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList mods = null)
{
diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs
index b7b73b99034a..0aa79c2049be 100644
--- a/osu.Game/Beatmaps/WorkingBeatmap.cs
+++ b/osu.Game/Beatmaps/WorkingBeatmap.cs
@@ -41,7 +41,7 @@ public abstract class WorkingBeatmap : IWorkingBeatmap
private CancellationTokenSource loadCancellationSource = new CancellationTokenSource();
- private readonly object beatmapFetchLock = new object();
+ private readonly Lock beatmapFetchLock = new Lock();
private readonly Lazy storyboard;
private readonly Lazy skin;
@@ -265,7 +265,7 @@ public IBeatmap GetPlayableBeatmap(IRulesetInfo ruleset, IReadOnlyList mods
using (var cancellationTokenSource = new CancellationTokenSource(10_000))
{
// don't apply the default timeout when debugger is attached (may be breakpointing / debugging).
- return GetPlayableBeatmap(ruleset, mods ?? Array.Empty(), Debugger.IsAttached ? CancellationToken.None : cancellationTokenSource.Token);
+ return GetPlayableBeatmap(ruleset, mods ?? [], Debugger.IsAttached ? CancellationToken.None : cancellationTokenSource.Token);
}
}
catch (OperationCanceledException)
diff --git a/osu.Game/Database/LegacyBeatmapImporter.cs b/osu.Game/Database/LegacyBeatmapImporter.cs
index a090698a6846..0c1f785312d1 100644
--- a/osu.Game/Database/LegacyBeatmapImporter.cs
+++ b/osu.Game/Database/LegacyBeatmapImporter.cs
@@ -21,7 +21,7 @@ protected override IEnumerable GetStableImportPaths(Storage storage)
{
// make sure the directory exists
if (!storage.ExistsDirectory(string.Empty))
- return Array.Empty();
+ return [];
List paths = new List();
diff --git a/osu.Game/Database/OnlineLookupCache.cs b/osu.Game/Database/OnlineLookupCache.cs
index a8bd5cbff252..2147de8a359d 100644
--- a/osu.Game/Database/OnlineLookupCache.cs
+++ b/osu.Game/Database/OnlineLookupCache.cs
@@ -71,7 +71,7 @@ public abstract partial class OnlineLookupCache : Mem
private readonly Queue<(TLookup id, TaskCompletionSource)> pendingTasks = new Queue<(TLookup, TaskCompletionSource)>();
private Task? pendingRequestTask;
- private readonly object taskAssignmentLock = new object();
+ private readonly Lock taskAssignmentLock = new Lock();
private Task queryValue(TLookup id)
{
diff --git a/osu.Game/Database/RealmResetEmptySet.cs b/osu.Game/Database/RealmResetEmptySet.cs
index 0daedc963373..24596d7d66e2 100644
--- a/osu.Game/Database/RealmResetEmptySet.cs
+++ b/osu.Game/Database/RealmResetEmptySet.cs
@@ -20,7 +20,7 @@ namespace osu.Game.Database
///
public class RealmResetEmptySet : IRealmCollection
{
- private IList emptySet => Array.Empty();
+ private IList emptySet => [];
[MustDisposeResource]
public IEnumerator GetEnumerator() => emptySet.GetEnumerator();
diff --git a/osu.Game/Graphics/ScreenshotManager.cs b/osu.Game/Graphics/ScreenshotManager.cs
index 28795b579900..a931465a37de 100644
--- a/osu.Game/Graphics/ScreenshotManager.cs
+++ b/osu.Game/Graphics/ScreenshotManager.cs
@@ -186,7 +186,7 @@ public Task TakeScreenshotAsync() => Task.Run(async () =>
}
});
- private static readonly object filename_reservation_lock = new object();
+ private static readonly Lock filename_reservation_lock = new Lock();
private (string? filename, Stream? stream) getWritableStream(ScreenshotFormat format)
{
diff --git a/osu.Game/Graphics/UserInterface/BarGraph.cs b/osu.Game/Graphics/UserInterface/BarGraph.cs
index e7592128b0cb..b4351319e0bd 100644
--- a/osu.Game/Graphics/UserInterface/BarGraph.cs
+++ b/osu.Game/Graphics/UserInterface/BarGraph.cs
@@ -202,7 +202,7 @@ private class BarsInfo
private readonly List initialLengths = new List();
private readonly List finalLengths = new List();
- public void Clear() => SetLengths(Array.Empty());
+ public void Clear() => SetLengths([]);
public void SetLengths(float[] newLengths)
{
diff --git a/osu.Game/Graphics/UserInterface/SegmentedGraph.cs b/osu.Game/Graphics/UserInterface/SegmentedGraph.cs
index 9f467687a409..5c917ef22b60 100644
--- a/osu.Game/Graphics/UserInterface/SegmentedGraph.cs
+++ b/osu.Game/Graphics/UserInterface/SegmentedGraph.cs
@@ -22,7 +22,7 @@ public partial class SegmentedGraph : Drawable
private bool graphNeedsUpdate;
private T[]? values;
- private int[] tiers = Array.Empty();
+ private int[] tiers = [];
private readonly SegmentManager segments;
private int tierCount;
@@ -39,7 +39,7 @@ public SegmentedGraph(int tierCount = 1)
public T[] Values
{
- get => values ?? Array.Empty();
+ get => values ?? [];
set
{
if (value == values) return;
@@ -90,7 +90,7 @@ private void recalculateTiers(T[]? arr)
{
if (arr == null || arr.Length == 0)
{
- tiers = Array.Empty();
+ tiers = [];
return;
}
diff --git a/osu.Game/IO/Legacy/SerializationReader.cs b/osu.Game/IO/Legacy/SerializationReader.cs
index fc61b028a4d8..95d842e2969c 100644
--- a/osu.Game/IO/Legacy/SerializationReader.cs
+++ b/osu.Game/IO/Legacy/SerializationReader.cs
@@ -40,7 +40,7 @@ public byte[] ReadByteArray()
if (len > 0) return ReadBytes(len);
if (len < 0) return null;
- return Array.Empty();
+ return [];
}
/// Reads a char array from the buffer, handling nulls and the array length.
@@ -50,7 +50,7 @@ public char[] ReadCharArray()
if (len > 0) return ReadChars(len);
if (len < 0) return null;
- return Array.Empty();
+ return [];
}
/// Reads a DateTime from the buffer.
diff --git a/osu.Game/IO/MigratableStorage.cs b/osu.Game/IO/MigratableStorage.cs
index d03d259f713d..6886aef9d087 100644
--- a/osu.Game/IO/MigratableStorage.cs
+++ b/osu.Game/IO/MigratableStorage.cs
@@ -19,17 +19,17 @@ public abstract class MigratableStorage : WrappedStorage
///
/// A relative list of directory paths which should not be migrated.
///
- public virtual string[] IgnoreDirectories => Array.Empty();
+ public virtual string[] IgnoreDirectories => [];
///
/// A relative list of file paths which should not be migrated.
///
- public virtual string[] IgnoreFiles => Array.Empty();
+ public virtual string[] IgnoreFiles => [];
///
/// A list of file/directory suffixes which should not be migrated.
///
- public virtual string[] IgnoreSuffixes => Array.Empty();
+ public virtual string[] IgnoreSuffixes => [];
protected MigratableStorage(Storage storage, string subPath = null)
: base(storage, subPath)
diff --git a/osu.Game/Input/Handlers/ReplayInputHandler.cs b/osu.Game/Input/Handlers/ReplayInputHandler.cs
index 712e0acb6073..c5e836784f74 100644
--- a/osu.Game/Input/Handlers/ReplayInputHandler.cs
+++ b/osu.Game/Input/Handlers/ReplayInputHandler.cs
@@ -45,8 +45,8 @@ public void Apply(InputState state, IInputStateChangeHandler handler)
if (!(state is RulesetInputManagerInputState inputState))
throw new InvalidOperationException($"{nameof(ReplayState)} should only be applied to a {nameof(RulesetInputManagerInputState)}");
- T[] released = Array.Empty();
- T[] pressed = Array.Empty();
+ T[] released = [];
+ T[] pressed = [];
var lastPressed = inputState.LastReplayState?.PressedActions;
diff --git a/osu.Game/Online/API/APIRequest.cs b/osu.Game/Online/API/APIRequest.cs
index 6b4c599d8722..76c89139e146 100644
--- a/osu.Game/Online/API/APIRequest.cs
+++ b/osu.Game/Online/API/APIRequest.cs
@@ -4,6 +4,7 @@
using System;
using System.Diagnostics;
using System.Globalization;
+using System.Threading;
using Newtonsoft.Json;
using osu.Framework.Extensions.TypeExtensions;
using osu.Framework.IO.Network;
@@ -94,7 +95,7 @@ public abstract class APIRequest
///
public event APIFailureHandler? Failure;
- private readonly object completionStateLock = new object();
+ private readonly Lock completionStateLock = new Lock();
///
/// The state of this request, from an outside perspective.
diff --git a/osu.Game/Online/API/OAuth.cs b/osu.Game/Online/API/OAuth.cs
index 772c1c2f45d8..e30dd3c53ab7 100644
--- a/osu.Game/Online/API/OAuth.cs
+++ b/osu.Game/Online/API/OAuth.cs
@@ -7,6 +7,7 @@
using System.Diagnostics;
using System.Net.Http;
using System.Net.Sockets;
+using System.Threading;
using Newtonsoft.Json;
using osu.Framework.Bindables;
@@ -118,7 +119,7 @@ internal bool AuthenticateWithRefresh(string refresh)
}
}
- private static readonly object access_token_retrieval_lock = new object();
+ private static readonly Lock access_token_retrieval_lock = new Lock();
///
/// Should be run before any API request to make sure we have a valid key.
diff --git a/osu.Game/Online/API/RegistrationRequest.cs b/osu.Game/Online/API/RegistrationRequest.cs
index 4498bc541824..63fdcb4e9508 100644
--- a/osu.Game/Online/API/RegistrationRequest.cs
+++ b/osu.Game/Online/API/RegistrationRequest.cs
@@ -40,13 +40,13 @@ public class RegistrationRequestErrors
public class UserErrors
{
[JsonProperty("username")]
- public string[] Username = Array.Empty();
+ public string[] Username = [];
[JsonProperty("user_email")]
- public string[] Email = Array.Empty();
+ public string[] Email = [];
[JsonProperty("password")]
- public string[] Password = Array.Empty();
+ public string[] Password = [];
}
}
}
diff --git a/osu.Game/Online/API/Requests/GetScoresRequest.cs b/osu.Game/Online/API/Requests/GetScoresRequest.cs
index eb0c82e7903a..78ca961be20a 100644
--- a/osu.Game/Online/API/Requests/GetScoresRequest.cs
+++ b/osu.Game/Online/API/Requests/GetScoresRequest.cs
@@ -38,7 +38,7 @@ public GetScoresRequest(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset, BeatmapL
this.beatmapInfo = beatmapInfo;
this.scope = scope;
this.ruleset = ruleset ?? throw new ArgumentNullException(nameof(ruleset));
- this.mods = mods ?? Array.Empty();
+ this.mods = mods ?? [];
ScoresRequested = this.scope.RequiresSupporter(this.mods.Any()) ? MAX_SCORES_PER_REQUEST : DEFAULT_SCORES_PER_REQUEST;
}
diff --git a/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs b/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs
index 9c7992736329..857ecf6b949e 100644
--- a/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs
+++ b/osu.Game/Online/API/Requests/Responses/APIBeatmap.cs
@@ -115,7 +115,7 @@ private double hitLengthInSeconds
public double BPM { get; set; }
[JsonProperty(@"owners")]
- public BeatmapOwner[] BeatmapOwners { get; set; } = Array.Empty();
+ public BeatmapOwner[] BeatmapOwners { get; set; } = [];
///
/// Minimum count of votes required to display a tag on the beatmap's page.
diff --git a/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs b/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs
index dc6c433f29cb..79132775fe32 100644
--- a/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs
+++ b/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs
@@ -59,7 +59,7 @@ public class APIBeatmapSet : IBeatmapSetOnlineInfo, IBeatmapSetInfo
public DateTimeOffset? LastUpdated { get; set; }
[JsonProperty("ratings")]
- public int[] Ratings { get; set; } = Array.Empty();
+ public int[] Ratings { get; set; } = [];
[JsonProperty(@"track_id")]
public int? TrackId { get; set; }
@@ -152,7 +152,7 @@ public string AuthorString
public string Tags { get; set; } = string.Empty;
[JsonProperty(@"beatmaps")]
- public APIBeatmap[] Beatmaps { get; set; } = Array.Empty();
+ public APIBeatmap[] Beatmaps { get; set; } = [];
[JsonProperty(@"converts")]
public APIBeatmap[]? Converts { get; set; }
diff --git a/osu.Game/Online/API/Requests/Responses/APIMenuContent.cs b/osu.Game/Online/API/Requests/Responses/APIMenuContent.cs
index 6aad0f6c8703..d2f3ddf5324d 100644
--- a/osu.Game/Online/API/Requests/Responses/APIMenuContent.cs
+++ b/osu.Game/Online/API/Requests/Responses/APIMenuContent.cs
@@ -13,7 +13,7 @@ public class APIMenuContent : IEquatable
/// Images which should be displayed in rotation.
///
[JsonProperty(@"images")]
- public APIMenuImage[] Images { get; init; } = Array.Empty();
+ public APIMenuImage[] Images { get; init; } = [];
public bool Equals(APIMenuContent? other)
{
diff --git a/osu.Game/Online/API/Requests/Responses/APITagCollection.cs b/osu.Game/Online/API/Requests/Responses/APITagCollection.cs
index a17769934871..99ab14900798 100644
--- a/osu.Game/Online/API/Requests/Responses/APITagCollection.cs
+++ b/osu.Game/Online/API/Requests/Responses/APITagCollection.cs
@@ -9,6 +9,6 @@ namespace osu.Game.Online.API.Requests.Responses
public class APITagCollection
{
[JsonProperty("tags")]
- public APITag[] Tags { get; set; } = Array.Empty();
+ public APITag[] Tags { get; set; } = [];
}
}
diff --git a/osu.Game/Online/API/Requests/Responses/APIUserScoreAggregate.cs b/osu.Game/Online/API/Requests/Responses/APIUserScoreAggregate.cs
index c870157fec1a..1e55b9c675bd 100644
--- a/osu.Game/Online/API/Requests/Responses/APIUserScoreAggregate.cs
+++ b/osu.Game/Online/API/Requests/Responses/APIUserScoreAggregate.cs
@@ -50,7 +50,7 @@ public ScoreInfo CreateScoreInfo() =>
TotalScore = TotalScore,
User = User,
Position = Position,
- Mods = Array.Empty()
+ Mods = []
};
}
}
diff --git a/osu.Game/Online/API/Requests/Responses/ChatAckResponse.cs b/osu.Game/Online/API/Requests/Responses/ChatAckResponse.cs
index f68735d390a5..e3a770d18487 100644
--- a/osu.Game/Online/API/Requests/Responses/ChatAckResponse.cs
+++ b/osu.Game/Online/API/Requests/Responses/ChatAckResponse.cs
@@ -10,6 +10,6 @@ namespace osu.Game.Online.API.Requests.Responses
public class ChatAckResponse
{
[JsonProperty("silences")]
- public ChatSilence[] Silences { get; set; } = Array.Empty();
+ public ChatSilence[] Silences { get; set; } = [];
}
}
diff --git a/osu.Game/Online/API/Requests/Responses/PutBeatmapSetResponse.cs b/osu.Game/Online/API/Requests/Responses/PutBeatmapSetResponse.cs
index e3ec617039f4..4d82a0006728 100644
--- a/osu.Game/Online/API/Requests/Responses/PutBeatmapSetResponse.cs
+++ b/osu.Game/Online/API/Requests/Responses/PutBeatmapSetResponse.cs
@@ -13,10 +13,10 @@ public class PutBeatmapSetResponse
public uint BeatmapSetId { get; set; }
[JsonProperty("beatmap_ids")]
- public ICollection BeatmapIds { get; set; } = Array.Empty();
+ public ICollection BeatmapIds { get; set; } = [];
[JsonProperty("files")]
- public ICollection Files { get; set; } = Array.Empty();
+ public ICollection Files { get; set; } = [];
}
public struct BeatmapSetFile
diff --git a/osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs b/osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs
index 2c5db66658a0..640acd54630f 100644
--- a/osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs
+++ b/osu.Game/Online/API/Requests/Responses/SoloScoreInfo.cs
@@ -58,7 +58,7 @@ public class SoloScoreInfo : IScoreInfo
public DateTimeOffset EndedAt { get; set; }
[JsonProperty("mods")]
- public APIMod[] Mods { get; set; } = Array.Empty();
+ public APIMod[] Mods { get; set; } = [];
[JsonIgnore]
[JsonProperty("created_at")]
diff --git a/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs b/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs
index 6d722807aa41..ad9e1bb048fb 100644
--- a/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs
+++ b/osu.Game/Online/Multiplayer/OnlineMultiplayerClient.cs
@@ -363,7 +363,7 @@ public override Task PlayCard(RankedPlayCardItem card)
public override Task GetMatchmakingPoolsOfType(MatchmakingPoolType type)
{
if (!IsConnected.Value)
- return Task.FromResult(Array.Empty());
+ return Task.FromResult([]);
Debug.Assert(connection != null);
return connection.InvokeAsync(nameof(IMatchmakingServer.GetMatchmakingPoolsOfType), type);
diff --git a/osu.Game/Online/Rooms/MultiplayerScore.cs b/osu.Game/Online/Rooms/MultiplayerScore.cs
index 74eaea8dbca0..20c166b76ee0 100644
--- a/osu.Game/Online/Rooms/MultiplayerScore.cs
+++ b/osu.Game/Online/Rooms/MultiplayerScore.cs
@@ -106,7 +106,7 @@ public ScoreInfo CreateScoreInfo(ScoreManager scoreManager, RulesetStore ruleset
Date = EndedAt,
HasOnlineReplay = HasReplay,
Rank = Rank,
- Mods = Mods?.Select(m => m.ToMod(rulesetInstance)).ToArray() ?? Array.Empty(),
+ Mods = Mods?.Select(m => m.ToMod(rulesetInstance)).ToArray() ?? [],
PP = PP,
Ranked = Ranked,
Position = Position,
diff --git a/osu.Game/Online/Rooms/PlaylistItem.cs b/osu.Game/Online/Rooms/PlaylistItem.cs
index b7b6a2d7b3d0..8ec88b653f4b 100644
--- a/osu.Game/Online/Rooms/PlaylistItem.cs
+++ b/osu.Game/Online/Rooms/PlaylistItem.cs
@@ -47,13 +47,13 @@ public class PlaylistItem : IEquatable
/// provided the mod is compatible with the rest of the user's selection.
///
[JsonProperty("allowed_mods")]
- public APIMod[] AllowedMods { get; set; } = Array.Empty();
+ public APIMod[] AllowedMods { get; set; } = [];
///
/// Mods that should be applied for every participant in the room.
///
[JsonProperty("required_mods")]
- public APIMod[] RequiredMods { get; set; } = Array.Empty();
+ public APIMod[] RequiredMods { get; set; } = [];
///
/// Used for deserialising from the API.
diff --git a/osu.Game/Online/Spectator/SpectatorScoreProcessor.cs b/osu.Game/Online/Spectator/SpectatorScoreProcessor.cs
index 7da0b4f279c6..5a9b13ab3d93 100644
--- a/osu.Game/Online/Spectator/SpectatorScoreProcessor.cs
+++ b/osu.Game/Online/Spectator/SpectatorScoreProcessor.cs
@@ -52,7 +52,7 @@ public partial class SpectatorScoreProcessor : Component
///
/// The applied s.
///
- public IReadOnlyList Mods => scoreInfo?.Mods ?? Array.Empty();
+ public IReadOnlyList Mods => scoreInfo?.Mods ?? [];
public Func GetDisplayScore => mode => scoreInfo?.GetDisplayScore(mode) ?? 0;
diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs
index caf2a6279a8e..ba540580e88f 100644
--- a/osu.Game/OsuGame.cs
+++ b/osu.Game/OsuGame.cs
@@ -865,7 +865,7 @@ public void PresentScore(IScoreInfo score, ScorePresentType presentType = ScoreP
IEnumerable validScreens =
Beatmap.Value.BeatmapInfo.Equals(databasedBeatmap) && Ruleset.Value.Equals(databasedScore.ScoreInfo.Ruleset)
? new[] { typeof(SongSelect), typeof(DailyChallenge) }
- : Array.Empty();
+ : [];
PerformFromScreen(screen =>
{
diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs
index a31dd24352ee..5759db228dcd 100644
--- a/osu.Game/OsuGameBase.cs
+++ b/osu.Game/OsuGameBase.cs
@@ -197,7 +197,7 @@ public virtual string Version
///
[Cached]
[Cached(typeof(IBindable>))]
- protected readonly Bindable> SelectedMods = new Bindable>(Array.Empty());
+ protected readonly Bindable> SelectedMods = new Bindable>([]);
///
/// Mods available for the current .
diff --git a/osu.Game/Overlays/BeatmapSet/AdvancedStats.cs b/osu.Game/Overlays/BeatmapSet/AdvancedStats.cs
index ae2b421edce4..8c57a8b8b31d 100644
--- a/osu.Game/Overlays/BeatmapSet/AdvancedStats.cs
+++ b/osu.Game/Overlays/BeatmapSet/AdvancedStats.cs
@@ -75,7 +75,7 @@ public IBeatmapInfo BeatmapInfo
///
/// No checks are done as to whether the mods specified are valid for the current .
///
- public Bindable> Mods { get; } = new Bindable>(Array.Empty());
+ public Bindable> Mods { get; } = new Bindable>([]);
public AdvancedStats(int columns = 1)
{
diff --git a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs
index 59b0547d4ee8..1c8600cc09e6 100644
--- a/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs
+++ b/osu.Game/Overlays/BeatmapSet/BeatmapPicker.cs
@@ -163,7 +163,7 @@ private void updateDisplay()
if (BeatmapSet != null)
{
- Difficulties.ChildrenEnumerable = BeatmapSet.Beatmaps.Concat(BeatmapSet.Converts ?? Array.Empty())
+ Difficulties.ChildrenEnumerable = BeatmapSet.Beatmaps.Concat(BeatmapSet.Converts ?? [])
.Where(b => b.Ruleset.MatchesOnlineID(ruleset.Value))
.OrderBy(b => !b.Convert)
.ThenBy(b => b.StarRating)
diff --git a/osu.Game/Overlays/BeatmapSet/FailRetryGraph.cs b/osu.Game/Overlays/BeatmapSet/FailRetryGraph.cs
index 697c879a35f5..2f3d90631d17 100644
--- a/osu.Game/Overlays/BeatmapSet/FailRetryGraph.cs
+++ b/osu.Game/Overlays/BeatmapSet/FailRetryGraph.cs
@@ -29,8 +29,8 @@ public APIFailTimes FailTimes
failTimes = value;
- int[] retries = FailTimes?.Retries ?? Array.Empty();
- int[] fails = FailTimes?.Fails ?? Array.Empty();
+ int[] retries = FailTimes?.Retries ?? [];
+ int[] fails = FailTimes?.Fails ?? [];
int[] retriesAndFails = sumRetriesAndFails(retries, fails);
float maxValue = retriesAndFails.Any() ? retriesAndFails.Max() : 0;
diff --git a/osu.Game/Overlays/BeatmapSet/Info.cs b/osu.Game/Overlays/BeatmapSet/Info.cs
index e25c1370c548..82805fa361d3 100644
--- a/osu.Game/Overlays/BeatmapSet/Info.cs
+++ b/osu.Game/Overlays/BeatmapSet/Info.cs
@@ -113,7 +113,7 @@ public Info()
BeatmapSet.BindValueChanged(b =>
{
- nominators.Metadata = (b.NewValue?.CurrentNominations ?? Array.Empty(), b.NewValue?.RelatedUsers ?? Array.Empty());
+ nominators.Metadata = (b.NewValue?.CurrentNominations ?? [], b.NewValue?.RelatedUsers ?? []);
source.Metadata = b.NewValue?.Source ?? string.Empty;
mapperTags.Metadata = b.NewValue?.Tags ?? string.Empty;
updateUserTags();
diff --git a/osu.Game/Overlays/Chat/DrawableChatUsername.cs b/osu.Game/Overlays/Chat/DrawableChatUsername.cs
index 59a4985d0836..bae16f14260f 100644
--- a/osu.Game/Overlays/Chat/DrawableChatUsername.cs
+++ b/osu.Game/Overlays/Chat/DrawableChatUsername.cs
@@ -174,10 +174,10 @@ public MenuItem[] ContextMenuItems
get
{
if (user.Equals(APIUser.SYSTEM_USER))
- return Array.Empty