virtualx-engine/core/variant
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
..
array.cpp Array: Relax slice bound checks to properly handle negative indices 2022-01-10 22:42:03 +01:00
array.h Array: Relax slice bound checks to properly handle negative indices 2022-01-10 22:42:03 +01:00
binder_common.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
callable.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
callable.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
callable_bind.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
callable_bind.h Merge pull request #53313 from KoBeWi/debinded_konnekt 2022-01-04 12:22:46 +01:00
container_type_validate.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
dictionary.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
dictionary.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
method_ptrcall.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
native_ptr.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
type_info.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
typed_array.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_call.cpp Array: Relax slice bound checks to properly handle negative indices 2022-01-10 22:42:03 +01:00
variant_construct.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_construct.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_destruct.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_destruct.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_internal.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_op.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_op.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_parser.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_parser.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_setget.cpp Merge pull request #53684 from TokageItLab/orthogonal-mode 2022-01-05 16:05:40 +01:00
variant_setget.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
variant_utility.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00