From b4be7504274d3461673a447558baaf0856787c84 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Fri, 12 Feb 2021 15:44:25 +1000 Subject: [PATCH] Use direct casts for Control.Tag of known type in FirmwaresConfig --- src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs b/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs index 2e816d39d0..b6972cbf25 100644 --- a/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs +++ b/src/BizHawk.Client.EmuHawk/config/FirmwaresConfig.cs @@ -280,7 +280,7 @@ namespace BizHawk.Client.EmuHawk // for each type of firmware, try resolving and record the result foreach (ListViewItem lvi in lvFirmwares.Items) { - var fr = lvi.Tag as FirmwareDatabase.FirmwareRecord; + var fr = (FirmwareDatabase.FirmwareRecord) lvi.Tag; var ri = Manager.Resolve( _pathEntries, _firmwareUserSpecifications, @@ -446,7 +446,7 @@ namespace BizHawk.Client.EmuHawk // for each selected item, set the user choice (even though multiple selection for this operation is no longer allowed) foreach (ListViewItem lvi in lvFirmwares.SelectedItems) { - var fr = lvi.Tag as FirmwareDatabase.FirmwareRecord; + var fr = (FirmwareDatabase.FirmwareRecord) lvi.Tag; string filePath = ofd.FileName; // if the selected file is an archive, allow the user to pick the inside file @@ -514,7 +514,7 @@ namespace BizHawk.Client.EmuHawk // for each selected item, clear the user choice foreach (ListViewItem lvi in lvFirmwares.SelectedItems) { - var fr = lvi.Tag as FirmwareDatabase.FirmwareRecord; + var fr = (FirmwareDatabase.FirmwareRecord) lvi.Tag; _firmwareUserSpecifications.Remove(fr.ConfigKey); }