remove id compare , soretedview

This commit is contained in:
Yoshifumi Kawai 2021-09-09 20:00:28 +09:00
parent a22f60acd4
commit 56e780ba35
2 changed files with 2 additions and 14 deletions

View File

@ -212,13 +212,7 @@ namespace ObservableCollections.Internal
public int Compare((T value, TKey id) x, (T value, TKey id) y)
{
var compare = comparer.Compare(x.value, y.value);
if (compare == 0)
{
compare = Comparer<TKey>.Default.Compare(x.id, y.id);
}
return compare;
return comparer.Compare(x.value, y.value);
}
}
}

View File

@ -231,13 +231,7 @@ namespace ObservableCollections.Internal
public int Compare((TView view, TKey id) x, (TView view, TKey id) y)
{
var compare = comparer.Compare(x.view, y.view);
if (compare == 0)
{
compare = Comparer<TKey>.Default.Compare(x.id, y.id);
}
return compare;
return comparer.Compare(x.view, y.view);
}
}
}