mirror of
https://github.com/golang/go
synced 2024-11-22 04:24:39 -07:00
sort: eliminate extra Len() call
R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5521052
This commit is contained in:
parent
a3baccefd6
commit
e36acdfb56
@ -191,7 +191,7 @@ func Sort(data Interface) {
|
|||||||
maxDepth++
|
maxDepth++
|
||||||
}
|
}
|
||||||
maxDepth *= 2
|
maxDepth *= 2
|
||||||
quickSort(data, 0, data.Len(), maxDepth)
|
quickSort(data, 0, n, maxDepth)
|
||||||
}
|
}
|
||||||
|
|
||||||
func IsSorted(data Interface) bool {
|
func IsSorted(data Interface) bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user