Avoid confusion with the name realloc

Fixes issue 1.
This commit is contained in:
kortschak
2013-12-27 19:40:43 +10:30
parent c3ee9fcffd
commit fadcd6dd7f
3 changed files with 13 additions and 11 deletions

View File

@@ -381,7 +381,9 @@ func max(a, b int) int {
return b
}
func realloc(f []float64, l int) []float64 {
// use returns a float64 slice with l elements, using f if it
// has the necessary capacity, otherwise creating a new slice.
func use(f []float64, l int) []float64 {
if l < cap(f) {
return f[:l]
}