parent
6fabe6d5ab
commit
15a81f2d5c
|
@ -81,12 +81,12 @@ func (x *intervalNode) color() rbcolor {
|
||||||
return x.c
|
return x.c
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *intervalNode) height() int {
|
func (x *intervalNode) height() int {
|
||||||
if n == nil {
|
if x == nil {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
ld := n.left.height()
|
ld := x.left.height()
|
||||||
rd := n.right.height()
|
rd := x.right.height()
|
||||||
if ld < rd {
|
if ld < rd {
|
||||||
return rd + 1
|
return rd + 1
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ var byteOrder binary.ByteOrder
|
||||||
func ByteOrder() binary.ByteOrder { return byteOrder }
|
func ByteOrder() binary.ByteOrder { return byteOrder }
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
var i int = 0x1
|
i := int(0x1)
|
||||||
if v := (*[intWidth]byte)(unsafe.Pointer(&i)); v[0] == 0 {
|
if v := (*[intWidth]byte)(unsafe.Pointer(&i)); v[0] == 0 {
|
||||||
byteOrder = binary.BigEndian
|
byteOrder = binary.BigEndian
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue