public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@mengyan1223.wang>
To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Cc: Oleksandr Kulkov <aleksandr.kulkov@phystech.edu>,
	Raihat Zaman Neloy <raihatneloy1992@gmail.com>,
	xry111@mengyan1223.wang
Subject: [PATCH 1/5] libstdc++: keep subtree sizes in pb_ds binary search trees (PR 81806)
Date: Mon, 13 Jul 2020 16:40:40 +0800	[thread overview]
Message-ID: <071987504076d5825c4d6aa148cfd463b79916f2.camel@mengyan1223.wang> (raw)
In-Reply-To: <67798e6881dcc5612ef31ac6b98586dfa5d83695.camel@mengyan1223.wang>

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

> The first patch removes two redundant statements which are confusing.  It
> should
> be applied anyway, disregarding other patches.

The patch is attached, to prevent my mail client from destroying it :(.

Please ignore a previous duplication of this mail with wrong title :(.

libstdc++-v3/ChangeLog:

	* include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
	  (insert_leaf_new, insert_imp_empty): remove redundant statements.
-- 
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University

[-- Attachment #2: 0001-libstdc-remove-two-redundant-statements-in-pb_ds-bin.patch --]
[-- Type: text/x-patch, Size: 1498 bytes --]

From 4eea45261ebf974ddf02f6154166c5cb6aa180da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?X=E2=84=B9=20Ruoyao?= <xry111@mengyan1223.wang>
Date: Fri, 10 Jul 2020 20:10:52 +0800
Subject: [PATCH 1/5] libstdc++: remove two redundant statements in pb_ds
 binary tree

libstdc++-v3/ChangeLog:

	* include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
	  (insert_leaf_new, insert_imp_empty): remove redundant statements.
---
 .../ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp        | 2 --
 1 file changed, 2 deletions(-)

diff --git a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
index 3942da05600..bdc10379af6 100644
--- a/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
+++ b/libstdc++-v3/include/ext/pb_ds/detail/bin_search_tree_/insert_fn_imps.hpp
@@ -122,7 +122,6 @@ insert_leaf_new(const_reference r_value, node_pointer p_nd, bool left_nd)
     }
 
   p_new_nd->m_p_parent = p_nd;
-  p_new_nd->m_p_left = p_new_nd->m_p_right = 0;
   PB_DS_ASSERT_NODE_CONSISTENT(p_nd)
 
   update_to_top(p_new_nd, (node_update* )this);
@@ -142,7 +141,6 @@ insert_imp_empty(const_reference r_value)
     m_p_head->m_p_parent = p_new_node;
 
   p_new_node->m_p_parent = m_p_head;
-  p_new_node->m_p_left = p_new_node->m_p_right = 0;
   _GLIBCXX_DEBUG_ONLY(debug_base::insert_new(PB_DS_V2F(r_value));)
 
   update_to_top(m_p_head->m_p_parent, (node_update*)this);
-- 
2.27.0


  parent reply	other threads:[~2020-07-13  8:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-13  8:37 [PATCH 0/5] " Xi Ruoyao
2020-07-13  8:39 ` Xi Ruoyao
2020-07-13  8:40 ` Xi Ruoyao [this message]
2020-07-13  8:42 ` [PATCH 2/5] " Xi Ruoyao
2020-07-13  8:45 ` [PATCH 3/5] " Xi Ruoyao
2020-07-13  8:48 ` [PATCH 4/5] " Xi Ruoyao
2020-07-13  8:51 ` [PATCH 5/5] " Xi Ruoyao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=071987504076d5825c4d6aa148cfd463b79916f2.camel@mengyan1223.wang \
    --to=xry111@mengyan1223.wang \
    --cc=aleksandr.kulkov@phystech.edu \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=raihatneloy1992@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).