From 1d589cf4ac34223df36d8da847cfae2d954e1465 Mon Sep 17 00:00:00 2001 From: Fardale Date: Sat, 14 Dec 2019 16:55:33 +0100 Subject: [PATCH] use array_is_empty_ instead of direct check --- src/core/CCVector.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/CCVector.ml b/src/core/CCVector.ml index 4bff2543..d4932bf5 100644 --- a/src/core/CCVector.ml +++ b/src/core/CCVector.ml @@ -145,14 +145,14 @@ let ensure_assuming_not_empty_ v ~size = ) let ensure_with ~init v size = - if Array.length v.vec = 0 then ( + if array_is_empty_ v then ( v.vec <- Array.make size init ) else ( ensure_assuming_not_empty_ v ~size ) let ensure v size = - if Array.length v.vec > 0 then ( + if not (array_is_empty_ v) then ( ensure_assuming_not_empty_ v ~size )