1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:44: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:
Robert Griesemer 2012-01-05 18:40:17 -08:00
parent a3baccefd6
commit e36acdfb56

View File

@ -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 {