From 6081a0aa3680fc238930567334afdedba2e69f6b Mon Sep 17 00:00:00 2001 From: Kazuhiro Fujieda Date: Thu, 8 Jan 2015 23:33:48 +0900 Subject: [PATCH] =?utf8?q?AkashiTimer.GetTimers=E3=81=8Cnull=E3=82=92?= =?utf8?q?=E8=BF=94=E3=81=95=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= =?utf8?q?=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- KancolleSniffer/AkashiTimer.cs | 6 ++---- KancolleSniffer/ShipInfoLabels.cs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/KancolleSniffer/AkashiTimer.cs b/KancolleSniffer/AkashiTimer.cs index cae35b6..d2caee2 100644 --- a/KancolleSniffer/AkashiTimer.cs +++ b/KancolleSniffer/AkashiTimer.cs @@ -60,7 +60,7 @@ namespace KancolleSniffer private class RepairStatus { private ShipStatus[] _target; - private RepairTime[][] _times; + private RepairTime[][] _times = new RepairTime[0][]; private DateTime _prev; public DateTime Start { get; set; } public int[] Deck { private get; set; } @@ -75,7 +75,7 @@ namespace KancolleSniffer Start = DateTime.MinValue; Deck = null; _target = null; - _times = null; + _times = new RepairTime[0][]; } public bool DeckChanged(int[] deck) @@ -104,8 +104,6 @@ namespace KancolleSniffer public RepairSpan[] GetTimers() { - if (_times == null) - return null; return (from times in _times select times == null ? new RepairSpan(0, TimeSpan.MinValue) diff --git a/KancolleSniffer/ShipInfoLabels.cs b/KancolleSniffer/ShipInfoLabels.cs index 69c656d..654cccf 100644 --- a/KancolleSniffer/ShipInfoLabels.cs +++ b/KancolleSniffer/ShipInfoLabels.cs @@ -124,7 +124,7 @@ namespace KancolleSniffer { var label = _akashiTimers[i]; var labelHp = _labels[i][0]; - if (timers == null || i >= timers.Length || timers[i].Span == TimeSpan.MinValue) + if (i >= timers.Length || timers[i].Span == TimeSpan.MinValue) { label.Visible = false; labelHp.ForeColor = Control.DefaultForeColor; -- 2.11.0