This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [google] Initialize fields in default ctor for _Hashtable_iterator (issue4430051)


Geez, working on too many different branches.  This is *not* a pph patch.

On Sat, Apr 16, 2011 at 16:30, Diego Novillo <dnovillo@google.com> wrote:
> I am committing this patch for David Li on google/main.
>
> The patch adds explicit initialization to the fields of
> _Hashtable_iterator in its default constructor. ÂDavid, could you
> describe why this change was needed? ÂWill you be submitting for
> trunk?
>
> Tested on x86_64. ÂCommitted to google/main.
>
>
> Diego.
>
> 2011-04-15 ÂXinliang David Li Â<davidxl@google.com>
>
> Â Â Â ÂGoogle ref 43787.
>
> Â Â Â Â* include/backward/hashtable.h
> Â Â Â Â(_Hashtable_iterator::_Hashtable_iterator): Initialize _M_cur and
> Â Â Â Â_M_ht in default constructor.
>
> diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h
> index 0bcaec4..c3eefcc 100644
> --- a/libstdc++-v3/include/backward/hashtable.h
> +++ b/libstdc++-v3/include/backward/hashtable.h
> @@ -126,7 +126,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
> Â Â Â _Hashtable_iterator(_Node* __n, _Hashtable* __tab)
> Â Â Â : _M_cur(__n), _M_ht(__tab) { }
>
> - Â Â Â_Hashtable_iterator() { }
> + Â Â Â_Hashtable_iterator()
> + Â Â Â: _M_cur(0), _M_ht(0) { }
>
> Â Â Â reference
> Â Â Â operator*() const
>
> --
> This patch is available for review at http://codereview.appspot.com/4430051
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]