godot/core/templates
Rémi Verschelde c6cefb1b79
Array: Relax slice bound checks to properly handle negative indices
The same is done for `Vector` (and thus `Packed*Array`).

`begin` and `end` can now take any value and will be clamped to
`[-size(), size()]`. Negative values are a shorthand for indexing the array
from the last element upward.

`end` is given a default `INT_MAX` value (which will be clamped to `size()`)
so that the `end` parameter can be omitted to go from `begin` to the max size
of the array.

This makes `slice` works similarly to numpy's and JavaScript's.
2022-01-10 22:42:03 +01:00
..
bin_sorted_array.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
command_queue_mt.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
command_queue_mt.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
cowdata.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
hash_map.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
hashfuncs.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
list.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
local_vector.h Add list initialization support for Vector & LocalVector 2022-01-05 20:42:09 +08:00
lru.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
map.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
oa_hash_map.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
ordered_hash_map.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
paged_allocator.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
paged_array.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
pair.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
pass_func.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
pooled_list.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
rid_owner.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
rid_owner.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
rid.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
ring_buffer.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
safe_list.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
safe_refcount.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
SCsub Reorganized core/ directory, it was too fatty already 2020-11-07 20:17:12 -03:00
search_array.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
self_list.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
set.h Fix crash on importing FBX file 2022-01-10 18:24:31 +08:00
simple_type.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
sort_array.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
thread_work_pool.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
thread_work_pool.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
vector.h Array: Relax slice bound checks to properly handle negative indices 2022-01-10 22:42:03 +01:00
vmap.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
vset.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00