1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 21:52:57 +08:00

Simplify null values handling

This commit is contained in:
Andrei Zavatski
2020-03-09 19:20:06 +03:00
Unverified
parent e8c726cf95
commit b77bd08925
@@ -12,16 +12,7 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
{
public UserHistoryCount[] Values
{
set
{
if (value == null)
{
Data = null;
return;
}
Data = value.Select(v => new KeyValuePair<DateTime, long>(v.Date, v.Count)).ToArray();
}
set => Data = value?.Select(v => new KeyValuePair<DateTime, long>(v.Date, v.Count)).ToArray();
}
protected override float GetDataPointHeight(long playCount) => playCount;