summaryrefslogtreecommitdiff
path: root/core/variant/array.h
AgeCommit message (Collapse)Author
2023-01-31GDScript: Fix issues with typed arraysDmitrii Maganov
2023-01-27GDScript: Fix test for read-only state of constantsDmitrii Maganov
2023-01-05One Copyright Update to rule them allRémi Verschelde
As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
2022-11-25Remove `Array.find_last()`Micky
2022-10-20add ability to pick random value from arrayNonunknown
2022-09-22[GDExtension] Implement support for typed arrays.bruvzg
2022-05-25Add `any()` and `all()` methods to ArrayHugo Locurcio
These can be used as faster, more convenient shorthands to using `filter()` + `size()`.
2022-05-17Implement read-only arraysGeorge Marques
Arrays can be set as read-only and thus cannot be modified. Assigning the array will create an editable copy. Similar to is already done to read-only dictionaries.
2022-03-27Const Ref Callable for custom sort/searchmashumafi
2022-01-10`Array`: Relax `slice` bound checks to properly handle negative indicesRémi Verschelde
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-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-11-26PackedByteArray, Array slice end exclusive, rename subarray to sliceNathan Franke
2021-11-23Rename `remove()` to `remove_at()` when removing by indexLightning_A
2021-10-30Modify Dictionary::operator== to do real key/value comparison with recursive ↵Emmanuel Leblond
support (and add unittests)
2021-08-28Merge pull request #47406 from mashumafi/master-Array-insert-rcMax Hilbrunner
Array::insert consistent with Pool*Array::insert
2021-08-27Add an `Array.pop_at()` method to pop an element at an arbitrary indexHugo Locurcio
Negative indices are supported to pop an element relative from the end.
2021-05-05Add filter, map and reduce to ArrayTomasz Chabora
2021-04-21Add fill method to Arrays and PackedArraysMatheus Lima Cunha
2021-04-01Merge pull request #46991 from madmiraal/rename-invert-reverseRémi Verschelde
Rename Array.invert() to Array.reverse()
2021-03-27Array::insert consistent with Pool*Array::insertmashumafi
2021-03-21Rename Array.invert() to Array.reverse()Marcel Admiraal
Does the same internally for List and Vector<>, which includes all PackedArray types.
2021-03-18Add functions to retrieve type of a typed ArrayGeorge Marques
2021-03-18Don't check type when assigning ArrayGeorge Marques
The array should just assimilate the type of the other one since assignment in this case means a change in the reference. This also adds a `typed_assign` function for the cases where type validation is wanted.
2021-02-04Change sort_custom/bsearch_custom to use Callableskobewi
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-11-08Add append_array() method to Array classTomasz Chabora
2020-11-07Reorganized core/ directory, it was too fatty alreadyreduz
-Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code