Commit e9a5a3cc authored by POTTIER Francois's avatar POTTIER Francois

Use unsafe array accesses in [ResizableArray].

parent b03577fb
......@@ -23,11 +23,11 @@ let length a =
let get a i =
assert (0 <= i && i < a.size);
a.table.(i)
Array.unsafe_get a.table (i)
let set a i x =
assert (0 <= i && i < a.size);
a.table.(i) <- x
Array.unsafe_set a.table (i) x
let resize a s =
assert (s >= 0);
......@@ -47,5 +47,5 @@ let resize a s =
a.table <- table
end;
a.size <- s
end
end;
assert (a.size <= Array.length a.table)
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