Use new ArgumentNullException and ObjectDisposedException throw-helper API (#4163)
This commit is contained in:
parent
470be03c2f
commit
0d3b82477e
15 changed files with 58 additions and 196 deletions
|
@ -32,20 +32,9 @@ namespace Ryujinx.HLE
|
|||
|
||||
public Switch(HLEConfiguration configuration)
|
||||
{
|
||||
if (configuration.GpuRenderer == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(configuration.GpuRenderer));
|
||||
}
|
||||
|
||||
if (configuration.AudioDeviceDriver == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(configuration.AudioDeviceDriver));
|
||||
}
|
||||
|
||||
if (configuration.UserChannelPersistence == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(configuration.UserChannelPersistence));
|
||||
}
|
||||
ArgumentNullException.ThrowIfNull(configuration.GpuRenderer);
|
||||
ArgumentNullException.ThrowIfNull(configuration.AudioDeviceDriver);
|
||||
ArgumentNullException.ThrowIfNull(configuration.UserChannelPersistence);
|
||||
|
||||
Configuration = configuration;
|
||||
FileSystem = Configuration.VirtualFileSystem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue