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:
parent
b7ed17dfbd
commit
5966c9af9c
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user