mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Mark properties as [CanBeNull]
This commit is contained in:
parent
ce47617476
commit
d167e0c8b9
@ -4,12 +4,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using static osu.Game.Users.User;
|
||||
|
||||
namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
{
|
||||
public class UserHistoryGraph : UserGraph<DateTime, long>
|
||||
{
|
||||
[CanBeNull]
|
||||
public UserHistoryCount[] Values
|
||||
{
|
||||
set => Data = value?.Select(v => new KeyValuePair<DateTime, long>(v.Date, v.Count)).ToArray();
|
||||
|
@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -79,11 +80,11 @@ namespace osu.Game.Overlays.Profile
|
||||
/// <summary>
|
||||
/// Set of values which will be used to create a graph.
|
||||
/// </summary>
|
||||
[CanBeNull]
|
||||
protected KeyValuePair<TKey, TValue>[] Data
|
||||
{
|
||||
set
|
||||
{
|
||||
value ??= Array.Empty<KeyValuePair<TKey, TValue>>();
|
||||
data = value;
|
||||
redrawGraph();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user