From 28592ee1ea1f5cdffcf85472f9de0285d928cf12 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Wed, 3 Aug 2011 16:54:30 +0200 Subject: Imported Upstream version 59 --- src/pkg/index/suffixarray/suffixarray.go | 4 ++-- src/pkg/index/suffixarray/suffixarray_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pkg/index') diff --git a/src/pkg/index/suffixarray/suffixarray.go b/src/pkg/index/suffixarray/suffixarray.go index 079b7d8ed..9d4e93217 100644 --- a/src/pkg/index/suffixarray/suffixarray.go +++ b/src/pkg/index/suffixarray/suffixarray.go @@ -115,7 +115,7 @@ func (x *Index) FindAllIndex(r *regexp.Regexp, n int) (result [][]int) { if len(indices) == 0 { return } - sort.SortInts(indices) + sort.Ints(indices) pairs := make([]int, 2*len(indices)) result = make([][]int, len(indices)) count := 0 @@ -159,7 +159,7 @@ func (x *Index) FindAllIndex(r *regexp.Regexp, n int) (result [][]int) { if len(indices) == 0 { return } - sort.SortInts(indices) + sort.Ints(indices) result = result[0:0] prev := 0 for _, i := range indices { diff --git a/src/pkg/index/suffixarray/suffixarray_test.go b/src/pkg/index/suffixarray/suffixarray_test.go index b1499027a..385ff0e56 100644 --- a/src/pkg/index/suffixarray/suffixarray_test.go +++ b/src/pkg/index/suffixarray/suffixarray_test.go @@ -141,7 +141,7 @@ func testLookup(t *testing.T, tc *testCase, x *Index, s string, n int) { // we cannot simply check that the res and exp lists are equal // check that each result is in fact a correct match and there are no duplicates - sort.SortInts(res) + sort.Ints(res) for i, r := range res { if r < 0 || len(tc.source) <= r { t.Errorf("test %q, lookup %q, result %d (n = %d): index %d out of range [0, %d[", tc.name, s, i, n, r, len(tc.source)) -- cgit v1.2.3