[ALL] Stop using "using" for everything except databases

This commit is contained in:
Matt Nadareski
2016-09-22 15:36:02 -07:00
parent 6b43053b7d
commit 74fbe60686
6 changed files with 239 additions and 248 deletions

View File

@@ -101,16 +101,17 @@ namespace SabreTools
// Now take care of the header and new output file
string hstr = string.Empty;
using (BinaryReader br = new BinaryReader(File.OpenRead(file)))
BinaryReader br = new BinaryReader(File.OpenRead(file));
// Extract the header as a string for the database
byte[] hbin = br.ReadBytes(headerSize);
for (int i = 0; i < headerSize; i++)
{
// Extract the header as a string for the database
byte[] hbin = br.ReadBytes(headerSize);
for (int i = 0; i < headerSize; i++)
{
hstr += BitConverter.ToString(new byte[] { hbin[i] });
}
hstr += BitConverter.ToString(new byte[] { hbin[i] });
}
br.Dispose();
// Then find an apply the exact rule to the file
SkipperRule rule = Skippers.MatchesSkipper(file, "", _logger);