mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
@@ -81,12 +81,12 @@ func (x *intervalNode) color() rbcolor {
|
||||
return x.c
|
||||
}
|
||||
|
||||
func (n *intervalNode) height() int {
|
||||
if n == nil {
|
||||
func (x *intervalNode) height() int {
|
||||
if x == nil {
|
||||
return 0
|
||||
}
|
||||
ld := n.left.height()
|
||||
rd := n.right.height()
|
||||
ld := x.left.height()
|
||||
rd := x.right.height()
|
||||
if ld < rd {
|
||||
return rd + 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user