mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Fix or suppress some ReSharper warnings
This commit is contained in:
parent
0846b86249
commit
ae35a1b916
6 changed files with 7 additions and 4 deletions
|
@ -414,6 +414,7 @@ internal class NcaFileSystemService : IRomFileSystemAccessFailureManager
|
|||
return Result.Success;
|
||||
}
|
||||
|
||||
// ReSharper disable once OutParameterValueIsAlwaysDiscarded.Local
|
||||
private Result OpenDataFileSystemCore(ref SharedRef<IFileSystem> outFileSystem, out bool isHostFs,
|
||||
ulong programId, StorageId storageId)
|
||||
{
|
||||
|
|
|
@ -630,6 +630,7 @@ public class NcaFileSystemServiceImpl
|
|||
{
|
||||
ulong ncaProgramId = ncaTemp.Header.TitleId;
|
||||
|
||||
// ReSharper disable once ConditionIsAlwaysTrueOrFalse
|
||||
if (ncaProgramId != ulong.MaxValue && ncaId != ncaProgramId)
|
||||
{
|
||||
return ResultFs.InvalidNcaId.Log();
|
||||
|
|
|
@ -212,7 +212,7 @@ public static class HierarchicalIntegrityVerificationStorageExtensions
|
|||
break;
|
||||
}
|
||||
|
||||
if (block == Validity.Unchecked && levelValidity != Validity.Invalid)
|
||||
if (block == Validity.Unchecked)
|
||||
{
|
||||
levelValidity = Validity.Unchecked;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ public struct NcaSparseInfo
|
|||
public Array16<byte> MetaHeader;
|
||||
public long PhysicalOffset;
|
||||
public ushort Generation;
|
||||
private Array6<byte> _reserved;
|
||||
public Array6<byte> Reserved;
|
||||
|
||||
public readonly uint GetGeneration() => (uint)(Generation << 16);
|
||||
public readonly long GetPhysicalSize() => MetaOffset + MetaSize;
|
||||
|
|
|
@ -85,7 +85,7 @@ public class AesXtsDirectory : IDirectory
|
|||
if (bytesRead != sizeof(uint) || magic != AesXtsFileHeader.AesXtsFileMagic) return 0;
|
||||
|
||||
file.Get.Read(out bytesRead, fileSizeOffset, SpanHelpers.AsByteSpan(ref fileSize), ReadOption.None);
|
||||
if (bytesRead != sizeof(long) || magic != AesXtsFileHeader.AesXtsFileMagic) return 0;
|
||||
if (bytesRead != sizeof(long)) return 0;
|
||||
|
||||
return fileSize;
|
||||
}
|
||||
|
|
|
@ -195,6 +195,7 @@ public class Nca
|
|||
|
||||
long nodeOffset = 0;
|
||||
long nodeSize = IndirectStorage.QueryNodeStorageSize(header.EntryCount);
|
||||
// ReSharper disable once UselessBinaryOperation
|
||||
long entryOffset = nodeOffset + nodeSize;
|
||||
long entrySize = IndirectStorage.QueryEntryStorageSize(header.EntryCount);
|
||||
|
||||
|
|
Loading…
Reference in a new issue