1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 00:33:21 +08:00

Do not rely on unspecified Dictionary.Values ordering

This commit is contained in:
Bartłomiej Dach 2023-05-04 18:26:45 +02:00
parent 0d2396c557
commit 26337dbcd8
No known key found for this signature in database

View File

@ -119,7 +119,11 @@ namespace osu.Game.Rulesets.Mods
/// <summary>
/// All <see cref="IBindable"/> settings within this mod.
/// </summary>
internal IEnumerable<IBindable> SettingsBindables => Settings.Values;
/// <remarks>
/// The settings are returned in ascending key order as per <see cref="Settings"/>.
/// The ordering is intentionally enforced manually, as ordering of <see cref="Dictionary{TKey,TValue}.Values"/> is unspecified.
/// </remarks>
internal IEnumerable<IBindable> SettingsBindables => Settings.OrderBy(pair => pair.Key).Select(pair => pair.Value);
/// <summary>
/// Provides mapping of names to <see cref="IBindable"/>s of all settings within this mod.