Closed scturtle closed 2 years ago
https://github.com/switchbrew/switch-examples/blob/b55cb17676fddbfb90488366a8e1dd71c55804cb/graphics/deko3d/deko_examples/source/SampleFramework/CIntrusiveTree.cpp#L195
should be child = node->left() ? node->left() : node->right();
child = node->left() ? node->left() : node->right();
according to
https://github.com/devkitPro/libctru/blob/59cf50c2018ba86cbf44420f7c3cf4420deecba4/libctru/source/util/rbtree/rbtree_remove.c#L110-L113
https://github.com/switchbrew/switch-examples/blob/b55cb17676fddbfb90488366a8e1dd71c55804cb/graphics/deko3d/deko_examples/source/SampleFramework/CIntrusiveTree.h#L176
shoud be bool empty() const { return m_root == nullptr; }
bool empty() const { return m_root == nullptr; }
Thank you for spotting these. Feel free to submit a PR to fix them :)
https://github.com/switchbrew/switch-examples/blob/b55cb17676fddbfb90488366a8e1dd71c55804cb/graphics/deko3d/deko_examples/source/SampleFramework/CIntrusiveTree.cpp#L195
should be
child = node->left() ? node->left() : node->right();
according to
https://github.com/devkitPro/libctru/blob/59cf50c2018ba86cbf44420f7c3cf4420deecba4/libctru/source/util/rbtree/rbtree_remove.c#L110-L113