code_style: remove all IDE warnings

This commit is contained in:
leo 2024-07-15 00:30:31 +08:00
parent 24ca3eaf8c
commit f4eca45754
No known key found for this signature in database
79 changed files with 1462 additions and 1378 deletions

View file

@ -48,20 +48,16 @@ namespace SourceGit.Native
public static Models.Shell GetShell()
{
if (OperatingSystem.IsWindows())
{
return (_backend as Windows).Shell;
}
else
{
return Models.Shell.Default;
}
return (_backend as Windows)!.Shell;
return Models.Shell.Default;
}
public static bool SetShell(Models.Shell shell)
{
if (OperatingSystem.IsWindows())
{
var windows = _backend as Windows;
var windows = (_backend as Windows)!;
if (windows.Shell != shell)
{
windows.Shell = shell;