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

Improve ForwardList.clear() #56

Closed
samchon opened this issue Dec 12, 2019 · 0 comments
Closed

Improve ForwardList.clear() #56

samchon opened this issue Dec 12, 2019 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@samchon
Copy link
Owner

samchon commented Dec 12, 2019

When call ForwardList.clear() method, it re-generates the iterator objects, especially the ForwardList.end() iterator. It can cause mis-iteration when the ForwardList.clear() method is called during the iteration routine.

public clear(): void
{
this.end_ = ForwardList.Iterator.create(this.ptr_, null!, null!);
this.before_begin_ = ForwardList.Iterator.create(this.ptr_, this.end_);
this.size_ = 0;
}

@samchon samchon added the enhancement New feature or request label Dec 12, 2019
@samchon samchon self-assigned this Dec 12, 2019
@samchon samchon added this to To do in v2.3 Update Dec 12, 2019
@samchon samchon added this to To do in v2.4 Update Dec 12, 2019
@samchon samchon added the bug Something isn't working label Dec 12, 2019
@samchon samchon moved this from To do to In progress in v2.3 Update Dec 12, 2019
@samchon samchon moved this from To do to Done in v2.4 Update Dec 12, 2019
@samchon samchon moved this from In progress to Patch in v2.3 Update Dec 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
v2.4 Update
  
Done
v2.3 Update
  
Patch
Development

No branches or pull requests

1 participant