Address PR feedback
Removes a useless null check Aligns some values to improve readability
This commit is contained in:
parent
912e43e979
commit
29a825b43b
12 changed files with 86 additions and 79 deletions
|
@ -33,7 +33,9 @@ namespace Ryujinx.Common
|
|||
using (var stream = GetStream(assembly, filename))
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
using (var mem = new MemoryStream())
|
||||
{
|
||||
|
@ -49,7 +51,9 @@ namespace Ryujinx.Common
|
|||
using (var stream = GetStream(assembly, filename))
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
using (var mem = new MemoryStream())
|
||||
{
|
||||
|
@ -79,7 +83,9 @@ namespace Ryujinx.Common
|
|||
using (var stream = GetStream(assembly, filename))
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
|
@ -93,7 +99,9 @@ namespace Ryujinx.Common
|
|||
using (var stream = GetStream(assembly, filename))
|
||||
{
|
||||
if (stream == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
|
@ -104,7 +112,7 @@ namespace Ryujinx.Common
|
|||
|
||||
public static Stream GetStream(string filename)
|
||||
{
|
||||
var (assembly, path) = ResolveManifestPath(filename);
|
||||
var (assembly, _) = ResolveManifestPath(filename);
|
||||
|
||||
return GetStream(assembly, filename);
|
||||
}
|
||||
|
@ -116,9 +124,6 @@ namespace Ryujinx.Common
|
|||
|
||||
var stream = assembly.GetManifestResourceStream(manifestUri);
|
||||
|
||||
if (stream == null)
|
||||
return null;
|
||||
|
||||
return stream;
|
||||
}
|
||||
|
||||
|
@ -131,11 +136,13 @@ namespace Ryujinx.Common
|
|||
foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
|
||||
{
|
||||
if (assembly.GetName().Name == segments[0])
|
||||
{
|
||||
return (assembly, segments[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (EmbeddedResources.ResourceAssembly, filename);
|
||||
return (ResourceAssembly, filename);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue