Commit ae51741d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2badfdea
...@@ -287,6 +287,7 @@ func (M *RangedMap) HasRange(r KeyRange) (yes bool) { ...@@ -287,6 +287,7 @@ func (M *RangedMap) HasRange(r KeyRange) (yes bool) {
} }
// scan right and verify that whole r is covered
lo := r.Lo lo := r.Lo
for { for {
e := M.entryv[ilo] e := M.entryv[ilo]
...@@ -296,7 +297,7 @@ func (M *RangedMap) HasRange(r KeyRange) (yes bool) { ...@@ -296,7 +297,7 @@ func (M *RangedMap) HasRange(r KeyRange) (yes bool) {
return false // hole in coverage return false // hole in coverage
} }
if r.Hi_ <= e.Hi_ { if r.Hi_ <= e.Hi_ {
return true // full coverage return true // reached full coverage
} }
lo = e.Hi_ lo = e.Hi_
...@@ -309,10 +310,6 @@ func (M *RangedMap) HasRange(r KeyRange) (yes bool) { ...@@ -309,10 +310,6 @@ func (M *RangedMap) HasRange(r KeyRange) (yes bool) {
return false // r's right not fully covered return false // r's right not fully covered
} }
} }
// // all keys from r are in M if r ∈ [ilo] XXX not in case of different values
// return (M.entryv[ilo].Lo <= r.Lo && r.Hi_ <= M.entryv[ilo].Hi_)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment