Skip to content

Commit 33fea96

Browse files
remove base and cast
1 parent 2a1d335 commit 33fea96

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

libcxx/include/__tree

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#ifndef _LIBCPP___TREE
1111
#define _LIBCPP___TREE
1212

13-
#include "__memory/pointer_traits.h"
1413
#include <__algorithm/min.h>
1514
#include <__assert>
1615
#include <__config>
@@ -1899,13 +1898,10 @@ pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
18991898
'std::__tree_node_base<min_pointer<void>>'
19001899
*/
19011900

1901+
// TODO: collapse into one branch
19021902
if (__libcpp_is_constant_evaluated()) {
1903-
typename __tree<_Tp, _Compare, _Allocator>::__node_holder::pointer cast =
1904-
static_cast< __tree<_Tp, _Compare, _Allocator>::__node_holder::pointer>(__h.get());
1905-
__node_base_pointer base = // static_cast<__node_base_pointer>(cast);
1906-
std::__static_fancy_pointer_cast<__node_base_pointer>(cast);
1907-
1908-
__insert_node_at(__parent, __child, base);
1903+
__insert_node_at(__parent, __child,
1904+
std::__static_fancy_pointer_cast<__node_base_pointer>(__h.get()));
19091905
} else {
19101906
__insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
19111907
}

0 commit comments

Comments
 (0)