mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
pref,cgen: support -no-bounds-checking, instead of -d no_bounds_checking, and make it enable direct_array_access for all fns/methods.
This commit is contained in:
@@ -611,7 +611,7 @@ pub fn memdup_uncollectable(src voidptr, sz int) voidptr {
|
||||
|
||||
[inline]
|
||||
fn v_fixed_index(i int, len int) int {
|
||||
$if !no_bounds_checking ? {
|
||||
$if !no_bounds_checking {
|
||||
if i < 0 || i >= len {
|
||||
s := 'fixed array index out of range (index: $i, len: $len)'
|
||||
panic(s)
|
||||
|
||||
Reference in New Issue
Block a user