mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
parent
a363f67f31
commit
48725a7937
1 changed files with 2 additions and 15 deletions
|
@ -50,22 +50,9 @@
|
|||
string sub2 = new string(tmp2, 0, loc2);
|
||||
int result;
|
||||
if (isDigit1 && isDigit2)
|
||||
{
|
||||
// compare numeric values
|
||||
if (sub1.Length == sub2.Length)
|
||||
{
|
||||
// if length is the same, lexicographical comparison is good also for numbers
|
||||
result = string.CompareOrdinal(sub1, sub2);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = sub1.Length.CompareTo(sub2.Length);
|
||||
}
|
||||
}
|
||||
result = loc1 == loc2 ? string.CompareOrdinal(sub1, sub2) : loc1 - loc2;
|
||||
else
|
||||
{
|
||||
result = string.Compare(sub1, sub2, System.StringComparison.Ordinal);
|
||||
}
|
||||
result = string.CompareOrdinal(sub1, sub2);
|
||||
|
||||
if (result != 0)
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue