Fix code style warnings in ext. tools

see 69b923ad5
This commit is contained in:
YoshiRulz 2025-02-24 10:34:37 +10:00
parent 5220ed4179
commit 54d33b09ee
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
2 changed files with 4 additions and 3 deletions

View File

@ -106,7 +106,7 @@ namespace BizHawk.DATTool
foreach (var s in listBoxFiles.Items)
{
if (s.ToString().Trim() == "")
if (string.IsNullOrWhiteSpace(s.ToString()))
{
MessageBox.Show($"The selected file: {s}Cannot be found.\n\nSort this out and try again");
return;

View File

@ -5,6 +5,7 @@ using System.Threading.Tasks;
using System.IO;
using System.Collections.Generic;
using BizHawk.Common.StringExtensions;
using BizHawk.Emulation.DiscSystem;
namespace BizHawk.DBManTool
@ -24,7 +25,7 @@ namespace BizHawk.DBManTool
dpCurr = dpTodo.Dequeue();
Parallel.ForEach(new DirectoryInfo(dpCurr).GetFiles(), (fi) =>
{
if (fi.Extension.ToUpperInvariant() == extUppercaseWithDot)
if (extUppercaseWithDot.EqualsIgnoreCase(fi.Extension))
lock (ret)
ret.Add(fi.FullName);
});
@ -59,7 +60,7 @@ namespace BizHawk.DBManTool
var done = new HashSet<string>();
foreach (var line in File.ReadAllLines(fpOutfile))
{
if (line.Trim() == "") continue;
if (string.IsNullOrWhiteSpace(line)) continue;
var parts = line.Split(new[] { "//" }, StringSplitOptions.None);
done.Add(parts[1]);
}