From patchwork Sun Jul 24 19:48:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 106568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3EB94B6F7F for ; Mon, 25 Jul 2011 05:49:10 +1000 (EST) Received: (qmail 24455 invoked by alias); 24 Jul 2011 19:49:06 -0000 Received: (qmail 24438 invoked by uid 22791); 24 Jul 2011 19:49:06 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtp205.alice.it (HELO smtp205.alice.it) (82.57.200.101) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 24 Jul 2011 19:48:50 +0000 Received: from [192.168.1.4] (79.51.26.129) by smtp205.alice.it (8.5.124.08) id 4DE6347505286086; Sun, 24 Jul 2011 21:48:48 +0200 Message-ID: <4E2C7722.3090805@oracle.com> Date: Sun, 24 Jul 2011 21:48:50 +0200 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Fran=E7ois_Dumont?= CC: "libstdc++@gcc.gnu.org" , gcc-patches@gcc.gnu.org Subject: Re: hash policy patch References: <4E2B2FB0.1080102@free.fr> <4E2B59CB.4010903@oracle.com> <4E2C717F.6030301@free.fr> In-Reply-To: <4E2C717F.6030301@free.fr> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org ... Francois, your patch, as applied had nasty typos, which probably broke the build (or we lacking tons of testcases ;) I committed the below. Paolo. PS: I think the fix could be suited also for the branch, maybe after a couple of weeks of testing... /////////////////// 2011-07-24 Paolo Carlini * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_next_bkt, _M_bkt_for_elements, _M_need_rehash): Fix typos in the last commit. Index: include/bits/hashtable_policy.h =================================================================== --- include/bits/hashtable_policy.h (revision 176717) +++ include/bits/hashtable_policy.h (working copy) @@ -431,7 +431,7 @@ + _S_n_primes, __n); _M_next_resize = static_cast(__builtin_floor(__p * _M_max_load_factor)); - return *__p; + return __p; } // Return the smallest prime p such that alpha p >= n, where alpha @@ -445,7 +445,7 @@ + _S_n_primes, __min_bkts); _M_next_resize = static_cast(__builtin_floor(__p * _M_max_load_factor)); - return *__p; + return __p; } // Finds the smallest prime p such that alpha p > __n_elt + __n_ins. @@ -474,7 +474,7 @@ __min_bkts); _M_next_resize = static_cast (__builtin_floor(__p * _M_max_load_factor)); - return std::make_pair(true, *__p); + return std::make_pair(true, __p); } else {