mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
array: inline ensure_cap
This commit is contained in:
parent
ef26f27753
commit
3256d060f7
@ -53,6 +53,7 @@ fn new_array_from_c_array_no_alloc(len, cap, elm_size int, c_array voidptr) arra
|
||||
}
|
||||
|
||||
// Private function. Doubles array capacity if needed
|
||||
[inline]
|
||||
fn (a mut array) ensure_cap(required int) {
|
||||
if required <= a.cap {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user