avr-stl icon indicating copy to clipboard operation
avr-stl copied to clipboard

Red-Black tree iterator increment

Open MikeGWem opened this issue 7 years ago • 0 comments

The iterator increment method for a Red-Black Tree has an edge case that fails to change the node pointer. If the current node of the iterator is the root and there are no right hand children (and obviously no parent) then the node referenced by the iterator does not change. This means that iterations are effectively halted with the code potentially looping.

I hit the same thing when testing a version I had written and thought I would check the "master version" so to speak.

MikeGWem avatar Apr 06 '18 11:04 MikeGWem