Skip to content

Commit

Permalink
Use var because I can
Browse files Browse the repository at this point in the history
  • Loading branch information
mnadareski committed Aug 8, 2024
1 parent 45de58d commit 6ec5c69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions NDecrypt.N3DS/CIATool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public bool ProcessFile()
try
{
// Open the read and write on the same file for inplace processing
using BinaryReader reader = new BinaryReader(File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
using BinaryWriter writer = new BinaryWriter(File.Open(filename, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite));
using var reader = new BinaryReader(File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
using var writer = new BinaryWriter(File.Open(filename, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite));

// Deserialize the CIA information
var cia = Serializer.ReadCIA(reader);
Expand Down
4 changes: 2 additions & 2 deletions NDecrypt.Nitro/DSTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ public bool ProcessFile()
try
{
// Open the read and write on the same file for inplace processing
using BinaryReader reader = new BinaryReader(File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
using BinaryWriter writer = new BinaryWriter(File.Open(filename, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite));
using var reader = new BinaryReader(File.Open(filename, FileMode.Open, FileAccess.Read, FileShare.ReadWrite));
using var writer = new BinaryWriter(File.Open(filename, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite));

// Deserialize the cart information
Cart? cart = Serializer.ReadCart(reader);
Expand Down

0 comments on commit 6ec5c69

Please sign in to comment.