Skip to content

Commit ab8ffed

Browse files
committed
Code style cleanup
1 parent 015bd2f commit ab8ffed

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

Library/DiscUtils.Core/Raw/DiskImageFile.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ private static long FloppyCapacity(FloppyDiskType type)
219219
{
220220
FloppyDiskType.DoubleDensity => Sizes.Sector * 1440,
221221
FloppyDiskType.HighDensity => Sizes.Sector * 2880,
222-
FloppyDiskType.Extended => (long)(Sizes.Sector * 5760),
222+
FloppyDiskType.Extended => Sizes.Sector * 5760,
223223
_ => throw new ArgumentException("Invalid floppy disk type", nameof(type)),
224224
};
225225
}

Library/DiscUtils.Fat/Directory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ internal FatFileStream OpenFile(string name, FileMode mode, FileAccess fileAcces
308308
stream.Seek(0, SeekOrigin.End);
309309
}
310310

311-
HandleAccessed(false);
311+
HandleAccessed(forWrite: false);
312312

313313
return stream;
314314
}

Library/DiscUtils.Fat/FastEncodingTable.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public FastEncodingTable(Encoding encoding)
138138
/// <param name="b">The byte to convert.</param>
139139
/// <returns>The char converted or <see cref="ReplacementChar"/> if no mapping exists.</returns>
140140
[MethodImpl(MethodImplOptions.AggressiveInlining)]
141-
public char GetCharFromByte(byte b) => _mapByteToChar[(int)b];
141+
public char GetCharFromByte(byte b) => _mapByteToChar[b];
142142

143143
/// <summary>
144144
/// Gets the upper case byte for the specified char.

Library/DiscUtils.MountDokan/DokanDiscUtils.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ public NtStatus GetDiskFreeSpace(out long freeBytesAvailable, out long totalNumb
10841084
totalNumberOfFreeBytes = FileSystem.AvailableSpace;
10851085
}
10861086

1087-
return Trace(nameof(GetDiskFreeSpace), null as string, info, DokanResult.Success, freeBytesAvailable,
1087+
return Trace(nameof(GetDiskFreeSpace), null, info, DokanResult.Success, freeBytesAvailable,
10881088
totalNumberOfBytes, totalNumberOfFreeBytes);
10891089
}
10901090

@@ -1152,7 +1152,7 @@ public NtStatus GetVolumeInformation(NativeMemory<char> volumeLabel, out FileSys
11521152
volumeSerialNumber = dfs.VolumeId;
11531153
}
11541154

1155-
return Trace(nameof(GetVolumeInformation), null as string, info, DokanResult.Success, volumeLabel,
1155+
return Trace(nameof(GetVolumeInformation), null, info, DokanResult.Success, volumeLabel,
11561156
features, fileSystemName);
11571157
}
11581158

@@ -1243,9 +1243,9 @@ public NtStatus SetFileSecurity(ReadOnlyNativeMemory<char> fileNamePtr, FileSyst
12431243
}
12441244
}
12451245

1246-
public NtStatus Mounted(ReadOnlyNativeMemory<char> mountPoint, ref DokanFileInfo info) => Trace(nameof(Mounted), null as string, info, DokanResult.Success);
1246+
public NtStatus Mounted(ReadOnlyNativeMemory<char> mountPoint, ref DokanFileInfo info) => Trace(nameof(Mounted), null, info, DokanResult.Success);
12471247

1248-
public NtStatus Unmounted(ref DokanFileInfo info) => Trace(nameof(Unmounted), null as string, info, DokanResult.Success);
1248+
public NtStatus Unmounted(ref DokanFileInfo info) => Trace(nameof(Unmounted), null, info, DokanResult.Success);
12491249

12501250
public NtStatus FindStreams(ReadOnlyNativeMemory<char> fileNamePtr, out IEnumerable<FindFileInformation> streams, ref DokanFileInfo info)
12511251
{

0 commit comments

Comments
 (0)