Miscellaneous code style cleanup

This commit is contained in:
Alex Barney 2020-08-18 21:35:39 -07:00
parent 71824f06dc
commit 2242fc6371
6 changed files with 7 additions and 13 deletions

View File

@ -383,7 +383,7 @@ namespace LibHacBuild
DotNetPublish(publishSettings);
if (EnvironmentInfo.IsUnix && !Untrimmed && !NoReflection)
if (EnvironmentInfo.IsUnix && !Untrimmed)
{
File.Copy(CliNativeExe, CliNativeExe + "_unstripped", true);
ProcessTasks.StartProcess("strip", CliNativeExe).AssertZeroExitCode();

View File

@ -21,7 +21,7 @@ namespace LibHac.FsSrv
public long SaveDataSize { get; private set; }
public long SaveDataJournalSize { get; private set; }
public FsPath SaveDataRootPath { get; } = default;
public FsPath SaveDataRootPath { get; }
public bool AutoCreateSaveData { get; private set; }
internal FileSystemProxy(FileSystemProxyCore fsProxyCore, FileSystemServer fsServer)

View File

@ -22,7 +22,7 @@ namespace LibHac.FsSystem
private SubStorage NodeStorage { get; set; }
private SubStorage EntryStorage { get; set; }
private NodeBuffer _nodeL1 = new NodeBuffer();
private NodeBuffer _nodeL1;
private long NodeSize { get; set; }
private long EntrySize { get; set; }

View File

@ -14,9 +14,9 @@ namespace LibHac.FsSystem
private SubStorage NodeStorage { get; set; }
private SubStorage EntryStorage { get; set; }
private NodeBuffer _l1Node = new NodeBuffer();
private NodeBuffer _l2Node = new NodeBuffer();
private NodeBuffer _entrySet = new NodeBuffer();
private NodeBuffer _l1Node;
private NodeBuffer _l2Node;
private NodeBuffer _entrySet;
private int NodeSize { get; set; }
private int EntrySize { get; set; }

View File

@ -145,12 +145,6 @@ namespace LibHac.FsSystem
Blocks.AddFirst(node);
}
// If a supposedly active block is null, something's really wrong
if (node is null)
{
throw new NullReferenceException("CachedStorage cache block is unexpectedly null.");
}
return node.Value;
}

View File

@ -336,7 +336,7 @@ namespace LibHac
}
T? instance = reference._instance;
var referenceCount = reference._boxedReferenceCount;
StrongBox<int> referenceCount = reference._boxedReferenceCount;
if (instance == null)
{
// The specified reference is already not valid. This case is supported by WeakReference (not