mirror of
https://github.com/golang/go
synced 2024-11-22 04:04:40 -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 *= 2
|
||||
quickSort(data, 0, data.Len(), maxDepth)
|
||||
quickSort(data, 0, n, maxDepth)
|
||||
}
|
||||
|
||||
func IsSorted(data Interface) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user