public static CompareNames ( byte a, byte b, int lastA, int lastB ) : int | ||
a | byte | name |
b | byte | name |
lastA | int | '/' if a is a tree, else NULL. |
lastB | int | '/' if b is a tree, else NULL. |
return | int |
private static int Compare(TreeEntry t1, TreeEntry t2) { if ((((t1 != null) && (t1.Parent == null)) && (t2 != null)) && (t2.Parent == null)) { return(0); } if ((t1 != null) && (t1.Parent == null)) { return(-1); } if ((t2 != null) && (t2.Parent == null)) { return(1); } if ((t1 == null) && (t2 == null)) { return(0); } if (t1 == null) { return(1); } if (t2 == null) { return(-1); } return(Tree.CompareNames(t1.FullNameUTF8, t2.FullNameUTF8, TreeEntry.LastChar(t1), TreeEntry.LastChar(t2))); }
public int CompareTo(TreeEntry other) { if (other != null) { return(Tree.CompareNames(NameUTF8, other.NameUTF8, LastChar(this), LastChar(other))); } return(-1); }
private static int Compare(TreeEntry t, GitIndex.Entry i) { if ((t == null) && (i == null)) { return(0); } if (t == null) { return(1); } if (i == null) { return(-1); } return(Tree.CompareNames(t.FullNameUTF8, i.NameUTF8, TreeEntry.LastChar(t), TreeEntry.LastChar(i))); }