1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-17 08:42:56 +08:00

Limit generic type to IConvertible structures (common number types)

This commit is contained in:
Salman Ahmed 2020-04-10 15:50:07 +03:00
parent b7ed17dfbd
commit 5966c9af9c

View File

@ -13,6 +13,7 @@ namespace osu.Game.Lists
/// </summary>
/// <typeparam name="T">The type of interval values.</typeparam>
public class IntervalList<T> : ICollection<Interval<T>>, IReadOnlyList<Interval<T>>
where T : struct, IConvertible
{
private static readonly IComparer<T> type_comparer = Comparer<T>.Default;
@ -103,6 +104,7 @@ namespace osu.Game.Lists
}
public readonly struct Interval<T>
where T : struct, IConvertible
{
/// <summary>
/// The start value of this interval.