mirror of
https://github.com/golang/go
synced 2024-11-17 15:04:45 -07:00
hash/crc32: rename iEEETable to ieeeTable
iEEETable violates the Go naming conventions and is inconsistent with the rest of the package. Use ieeeTable instead. Change-Id: I04b201aa39759d159de2b0295f43da80488c2263 Reviewed-on: https://go-review.googlesource.com/17068 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
ec3daf0c62
commit
d6ee6c2d06
@ -57,9 +57,9 @@ var IEEETable = makeTable(IEEE)
|
||||
// slicing8Table is array of 8 Tables
|
||||
type slicing8Table [8]Table
|
||||
|
||||
// iEEETable8 is the slicing8Table for IEEE
|
||||
var iEEETable8 *slicing8Table
|
||||
var iEEETable8Once sync.Once
|
||||
// ieeeTable8 is the slicing8Table for IEEE
|
||||
var ieeeTable8 *slicing8Table
|
||||
var ieeeTable8Once sync.Once
|
||||
|
||||
// MakeTable returns a Table constructed from the specified polynomial.
|
||||
// The contents of this Table must not be modified.
|
||||
|
@ -44,10 +44,10 @@ func updateIEEE(crc uint32, p []byte) uint32 {
|
||||
|
||||
// only use slicing-by-8 when input is >= 4KB
|
||||
if len(p) >= 4096 {
|
||||
iEEETable8Once.Do(func() {
|
||||
iEEETable8 = makeTable8(IEEE)
|
||||
ieeeTable8Once.Do(func() {
|
||||
ieeeTable8 = makeTable8(IEEE)
|
||||
})
|
||||
return updateSlicingBy8(crc, iEEETable8, p)
|
||||
return updateSlicingBy8(crc, ieeeTable8, p)
|
||||
}
|
||||
|
||||
return update(crc, IEEETable, p)
|
||||
|
@ -27,10 +27,10 @@ func updateCastagnoli(crc uint32, p []byte) uint32 {
|
||||
func updateIEEE(crc uint32, p []byte) uint32 {
|
||||
// only use slicing-by-8 when input is >= 4KB
|
||||
if len(p) >= 4096 {
|
||||
iEEETable8Once.Do(func() {
|
||||
iEEETable8 = makeTable8(IEEE)
|
||||
ieeeTable8Once.Do(func() {
|
||||
ieeeTable8 = makeTable8(IEEE)
|
||||
})
|
||||
return updateSlicingBy8(crc, iEEETable8, p)
|
||||
return updateSlicingBy8(crc, ieeeTable8, p)
|
||||
}
|
||||
|
||||
return update(crc, IEEETable, p)
|
||||
|
@ -16,10 +16,10 @@ func updateCastagnoli(crc uint32, p []byte) uint32 {
|
||||
func updateIEEE(crc uint32, p []byte) uint32 {
|
||||
// only use slicing-by-8 when input is >= 4KB
|
||||
if len(p) >= 4096 {
|
||||
iEEETable8Once.Do(func() {
|
||||
iEEETable8 = makeTable8(IEEE)
|
||||
ieeeTable8Once.Do(func() {
|
||||
ieeeTable8 = makeTable8(IEEE)
|
||||
})
|
||||
return updateSlicingBy8(crc, iEEETable8, p)
|
||||
return updateSlicingBy8(crc, ieeeTable8, p)
|
||||
}
|
||||
return update(crc, IEEETable, p)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user