Skip to content

Commit

Permalink
Finish refactor of iter bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
umpc committed Jul 6, 2017
1 parent ac6e7fd commit 47544e3
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions bounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,6 @@ func (sm *SortedMap) boundsIdxSearch(lowerBound, upperBound interface{}) []int {
}
}

if lowerBound != nil && upperBound != nil {
if lowerBoundIdx == upperBoundIdx {
valFromIdx := sm.idx[sm.sorted[lowerBoundIdx]]

if !sm.lessFn(lowerBound, upperBound) && !sm.lessFn(upperBound, lowerBound) {
// lowerBound == upperBound
if sm.lessFn(valFromIdx, lowerBound) || sm.lessFn(lowerBound, valFromIdx) {
return nil
}
}

if sm.lessFn(valFromIdx, lowerBound) || sm.lessFn(upperBound, valFromIdx) {
return nil
}
}
}

if lowerBoundIdx > upperBoundIdx {
return nil
}
Expand Down

0 comments on commit 47544e3

Please sign in to comment.