mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
eb03ac17f1
Add specialized rotations RB_RED_ROTATE_LEFT() and RB_RED_ROTATE_RIGHT() which may be used if we rotate a red child which has a black sibling. Such a red node must have at least two child nodes so that the following red-black tree invariant is fulfilled: Every path from a given node to any of its descendant NULL nodes goes through the same number of black nodes. PARENT / \ BLACK RED / \ BLACK BLACK