mirror of
https://github.com/emirpasic/gods
synced 2024-11-13 19:12:07 +00:00
Merge branch 'development'
This commit is contained in:
commit
3bca87dfc4
@ -56,13 +56,11 @@ func (iterator *Iterator) Next() bool {
|
||||
}
|
||||
goto between
|
||||
}
|
||||
if iterator.node.Parent != nil {
|
||||
for iterator.node.Parent != nil {
|
||||
node := iterator.node
|
||||
for iterator.node.Parent != nil {
|
||||
iterator.node = iterator.node.Parent
|
||||
if iterator.tree.Comparator(node.Key, iterator.node.Key) <= 0 {
|
||||
goto between
|
||||
}
|
||||
iterator.node = iterator.node.Parent
|
||||
if node == iterator.node.Left {
|
||||
goto between
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,13 +96,11 @@ func (iterator *Iterator) Prev() bool {
|
||||
}
|
||||
goto between
|
||||
}
|
||||
if iterator.node.Parent != nil {
|
||||
for iterator.node.Parent != nil {
|
||||
node := iterator.node
|
||||
for iterator.node.Parent != nil {
|
||||
iterator.node = iterator.node.Parent
|
||||
if iterator.tree.Comparator(node.Key, iterator.node.Key) >= 0 {
|
||||
goto between
|
||||
}
|
||||
iterator.node = iterator.node.Parent
|
||||
if node == iterator.node.Right {
|
||||
goto between
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user