Skip to content

Conversation

@akiramusic000
Copy link

This changes the retain doc comment from:
Note that this clones the vector even if f always returns false. To prevent that, you can first iterate over the vector yourself and then only call retain if your condition is false for some element.

To:
Note that this clones the vector even if f always returns true. To prevent that, you can first iterate over the vector yourself and then only call retain if your condition is false for some element.

This makes more sense, since if f always returns true, nothing is changed, so common sense would be that the vector wouldn't be cloned, but this comment says otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant