code_style: general cleanup (#1415)

* code_style:  general cleanup

* code_style: whitespace cleanup
This commit is contained in:
Nathan Baulch 2025-06-12 11:35:37 +10:00 committed by GitHub
parent 35eda489be
commit ffac71b15f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
89 changed files with 161 additions and 243 deletions

View file

@ -301,7 +301,7 @@ namespace SourceGit
return await clipboard.GetTextAsync();
}
}
return default;
return null;
}
public static string Text(string key, params object[] args)
@ -323,8 +323,7 @@ namespace SourceGit
icon.Height = 12;
icon.Stretch = Stretch.Uniform;
var geo = Current?.FindResource(key) as StreamGeometry;
if (geo != null)
if (Current?.FindResource(key) is StreamGeometry geo)
icon.Data = geo;
return icon;
@ -682,8 +681,7 @@ namespace SourceGit
}
var name = sb.ToString();
var idx = name.IndexOf('#');
if (idx >= 0)
if (name.Contains('#'))
{
if (!name.Equals("fonts:Inter#Inter", StringComparison.Ordinal) &&
!name.Equals("fonts:SourceGit#JetBrains Mono", StringComparison.Ordinal))