Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add negative index to Array.remove_at and Array.insert #83027

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rarysson
Copy link
Contributor

@rarysson rarysson commented Oct 9, 2023

Fix #46947 (and here #37209 (comment)) and address godotengine/godot-proposals#4637.

If the user can use negative indexes for array[-1] and array.pop_at(-1), for consistency, adding the same feature to Array.remove_at and Array.insert seems ideal.

@rarysson rarysson requested review from a team as code owners October 9, 2023 03:01
doc/classes/Array.xml Outdated Show resolved Hide resolved
doc/classes/Array.xml Outdated Show resolved Hide resolved
core/variant/array.cpp Outdated Show resolved Hide resolved
core/variant/array.cpp Outdated Show resolved Hide resolved
tests/core/variant/test_array.h Outdated Show resolved Hide resolved
@Chubercik
Copy link
Contributor

Please squash the commits into a single one as described in the PR workflow.

@Chaosus Chaosus added this to the 4.3 milestone Oct 15, 2023
@AThousandShips AThousandShips removed their request for review October 15, 2023 09:33
@AThousandShips AThousandShips modified the milestones: 4.3, 4.4 Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to use negative indices in Array.remove
4 participants