Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(609)

Side by Side Diff: src/pkg/unicode/maketables.go

Issue 4631098: code review 4631098: sort: rename helpers: s/Sort// in sort.Sort[Float64s|In... (Closed)
Patch Set: diff -r e276ba524959 https://go.googlecode.com/hg/ Created 12 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/time/sleep_test.go ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Unicode table generator. 5 // Unicode table generator.
6 // Data read from the web. 6 // Data read from the web.
7 7
8 package main 8 package main
9 9
10 import ( 10 import (
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1035 if len(orb) == 2 && chars[orb[0]].upperCase == orb[1] && chars[o rb[1]].lowerCase == orb[0] { 1035 if len(orb) == 2 && chars[orb[0]].upperCase == orb[1] && chars[o rb[1]].lowerCase == orb[0] {
1036 caseOrbit[i] = nil 1036 caseOrbit[i] = nil
1037 } 1037 }
1038 } 1038 }
1039 1039
1040 // Record orbit information in chars. 1040 // Record orbit information in chars.
1041 for _, orb := range caseOrbit { 1041 for _, orb := range caseOrbit {
1042 if orb == nil { 1042 if orb == nil {
1043 continue 1043 continue
1044 } 1044 }
1045 » » sort.SortInts(orb) 1045 » » sort.Ints(orb)
1046 c := orb[len(orb)-1] 1046 c := orb[len(orb)-1]
1047 for _, d := range orb { 1047 for _, d := range orb {
1048 chars[c].caseOrbit = d 1048 chars[c].caseOrbit = d
1049 c = d 1049 c = d
1050 } 1050 }
1051 } 1051 }
1052 1052
1053 printCaseOrbit() 1053 printCaseOrbit()
1054 1054
1055 // Tables of category and script folding exceptions: code points 1055 // Tables of category and script folding exceptions: code points
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 return 1242 return
1243 } 1243 }
1244 fmt.Println() 1244 fmt.Println()
1245 fmt.Printf("// Range entries: %d 16-bit, %d 32-bit, %d total.\n", range1 6Count, range32Count, range16Count+range32Count) 1245 fmt.Printf("// Range entries: %d 16-bit, %d 32-bit, %d total.\n", range1 6Count, range32Count, range16Count+range32Count)
1246 range16Bytes := range16Count * 3 * 2 1246 range16Bytes := range16Count * 3 * 2
1247 range32Bytes := range32Count * 3 * 4 1247 range32Bytes := range32Count * 3 * 4
1248 fmt.Printf("// Range bytes: %d 16-bit, %d 32-bit, %d total.\n", range16B ytes, range32Bytes, range16Bytes+range32Bytes) 1248 fmt.Printf("// Range bytes: %d 16-bit, %d 32-bit, %d total.\n", range16B ytes, range32Bytes, range16Bytes+range32Bytes)
1249 fmt.Println() 1249 fmt.Println()
1250 fmt.Printf("// Fold orbit bytes: %d pairs, %d bytes\n", foldPairCount, f oldPairCount*2*2) 1250 fmt.Printf("// Fold orbit bytes: %d pairs, %d bytes\n", foldPairCount, f oldPairCount*2*2)
1251 } 1251 }
OLDNEW
« no previous file with comments | « src/pkg/time/sleep_test.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b