@@ -296,7 +296,7 @@ struct __forward_node_traits {
296296# endif
297297
298298 _LIBCPP_HIDE_FROM_ABI static __begin_node_pointer __as_iter_node (__node_pointer __p) {
299- return static_cast <__begin_node_pointer>(static_cast <__void_pointer>( __p) );
299+ return static_cast <__begin_node_pointer>(__p);
300300 }
301301};
302302
@@ -363,12 +363,8 @@ class _LIBCPP_TEMPLATE_VIS __forward_list_iterator {
363363
364364 __begin_node_pointer __ptr_;
365365
366- _LIBCPP_HIDE_FROM_ABI __begin_node_pointer __get_begin () const {
367- return static_cast <__begin_node_pointer>(static_cast <__void_pointer>(__ptr_));
368- }
369- _LIBCPP_HIDE_FROM_ABI __node_pointer __get_unsafe_node_pointer () const {
370- return static_cast <__node_pointer>(static_cast <__void_pointer>(__ptr_));
371- }
366+ _LIBCPP_HIDE_FROM_ABI __begin_node_pointer __get_begin () const { return __ptr_; }
367+ _LIBCPP_HIDE_FROM_ABI __node_pointer __get_unsafe_node_pointer () const { return static_cast <__node_pointer>(__ptr_); }
372368
373369 _LIBCPP_HIDE_FROM_ABI explicit __forward_list_iterator (nullptr_t ) _NOEXCEPT : __ptr_(nullptr ) {}
374370
@@ -427,12 +423,8 @@ class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator {
427423
428424 __begin_node_pointer __ptr_;
429425
430- _LIBCPP_HIDE_FROM_ABI __begin_node_pointer __get_begin () const {
431- return static_cast <__begin_node_pointer>(static_cast <__void_pointer>(__ptr_));
432- }
433- _LIBCPP_HIDE_FROM_ABI __node_pointer __get_unsafe_node_pointer () const {
434- return static_cast <__node_pointer>(static_cast <__void_pointer>(__ptr_));
435- }
426+ _LIBCPP_HIDE_FROM_ABI __begin_node_pointer __get_begin () const { return __ptr_; }
427+ _LIBCPP_HIDE_FROM_ABI __node_pointer __get_unsafe_node_pointer () const { return static_cast <__node_pointer>(__ptr_); }
436428
437429 _LIBCPP_HIDE_FROM_ABI explicit __forward_list_const_iterator (nullptr_t ) _NOEXCEPT : __ptr_(nullptr ) {}
438430
0 commit comments