code_style: remove all IDE warnings

This commit is contained in:
leo 2024-07-14 15:55:15 +08:00
parent 9ac550242e
commit a807aa9e12
No known key found for this signature in database
94 changed files with 785 additions and 807 deletions

View file

@ -349,8 +349,8 @@ namespace SourceGit.ViewModels
{
if (l.IsRepository != r.IsRepository)
return l.IsRepository ? 1 : -1;
else
return l.Name.CompareTo(r.Name);
return string.Compare(l.Name, r.Name, StringComparison.Ordinal);
});
collection.Clear();
@ -413,13 +413,9 @@ namespace SourceGit.ViewModels
list.Sort((l, r) =>
{
if (l.IsRepository != r.IsRepository)
{
return l.IsRepository ? 1 : -1;
}
else
{
return l.Name.CompareTo(r.Name);
}
return string.Compare(l.Name, r.Name, StringComparison.Ordinal);
});
container.Clear();