Skip to content

Commit 4a117ce

Browse files
committed
code cleanup
1 parent a6b8321 commit 4a117ce

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

OpenHardwareMonitor/UI/MainForm.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,8 +667,7 @@ private void MainForm_Load(object sender, EventArgs e)
667667
treeView.Width += 1; //just to apply column auto-resize
668668

669669
//will display prompt only if update available & when main form displayed
670-
Task task = Task.Delay(1000)
671-
.ContinueWith(t => Updater.CheckForUpdates(true));
670+
Task.Delay(1000).ContinueWith(_ => Updater.CheckForUpdates(true));
672671

673672
FormClosed += MainForm_FormClosed;
674673
}

OpenHardwareMonitorLib/Hardware/Battery/Battery.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ namespace OpenHardwareMonitor.Hardware.Battery;
99
internal sealed class Battery : Hardware
1010
{
1111
private readonly SafeFileHandle _batteryHandle;
12-
private readonly Kernel32.BATTERY_INFORMATION _batteryInformation;
1312
private readonly uint _batteryTag;
1413
private readonly Sensor _chargeDischargeCurrent;
1514
private readonly Sensor _chargeDischargeRate;
@@ -38,7 +37,6 @@ public Battery
3837

3938
_batteryTag = batteryTag;
4039
_batteryHandle = batteryHandle;
41-
_batteryInformation = batteryInfo;
4240

4341
if (batteryInfo.Chemistry.SequenceEqual(new[] { 'P', 'b', 'A', 'c' }))
4442
{

0 commit comments

Comments
 (0)