Commit d2e463dd authored by POTTIER Francois's avatar POTTIER Francois
Browse files

Fix DWordBitSet.remove and QWordBitSet.remove in the same way, although it is...

Fix DWordBitSet.remove and QWordBitSet.remove in the same way, although it is not clear whether this is necessary.
parent 97408933
...@@ -75,9 +75,11 @@ let remove i s = ...@@ -75,9 +75,11 @@ let remove i s =
s s
| D (hi, lo) -> | D (hi, lo) ->
if i < A.bound then if i < A.bound then
construct hi (A.remove i lo) let lo' = A.remove i lo in
if lo == lo' then s else construct hi lo'
else else
construct (A.remove (i - A.bound) hi) lo let hi' = A.remove (i - A.bound) hi in
if hi == hi' then s else construct hi' lo
let fold f s accu = let fold f s accu =
match s with match s with
......
...@@ -102,17 +102,21 @@ let remove i s = ...@@ -102,17 +102,21 @@ let remove i s =
| Q (hhi, hlo, lhi, llo) -> | Q (hhi, hlo, lhi, llo) ->
if i < middle then if i < middle then
if i < quarter then if i < quarter then
construct hhi hlo lhi (A.remove i llo) let llo' = A.remove i llo in
if llo == llo' then s else construct hhi hlo lhi llo'
else else
let i = i - quarter in let i = i - quarter in
construct hhi hlo (A.remove i lhi) llo let lhi' = A.remove i lhi in
if lhi == lhi' then s else construct hhi hlo lhi' llo
else else
let i = i - middle in let i = i - middle in
if i < quarter then if i < quarter then
construct hhi (A.remove i hlo) lhi llo let hlo' = A.remove i hlo in
if hlo == hlo' then s else construct hhi hlo' lhi llo
else else
let i = i - quarter in let i = i - quarter in
construct (A.remove i hhi) hlo lhi llo let hhi' = A.remove i hhi in
if hhi == hhi' then s else construct hhi' hlo lhi llo
let fold f s accu = let fold f s accu =
match s with match s with
......
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