You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let[@inline] try_set v i a = i >=0&& i < v.length && (v.data.(i) <- a; true)
48
46
49
47
letreservecv=
50
-
letcap= capacity v in
51
-
if c >capthen
52
-
let cap =ref (if cap =0then growth_rate else float_of_int cap) in
53
-
letc=float_of_int cin
48
+
letold_c= capacity v in
49
+
if c >old_cthen
50
+
(* Formula taken from ocaml-containers CCVector implementation: https://github.com/c-cube/ocaml-containers/blob/69cd3ca78d60fbcb9aa2e6e63d92015af1f54941/src/core/CCVector.ml#L45 *)
0 commit comments