[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] [Patch 1/2] Libasprintf bug fixes
From: |
Daiki Ueno |
Subject: |
Re: [bug-gettext] [Patch 1/2] Libasprintf bug fixes |
Date: |
Mon, 04 Mar 2013 20:13:09 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Miguel Ángel <address@hidden> writes:
> + /* Copy constructor. Necessary because the destructor is nontrivial. */
> + autosprintf& autosprintf::operator = (const autosprintf& copy)
> + {
> + if (this != ©)
> + {
> + autosprintf tmp(copy);
> + std::swap (tmp.str, this->str);
> + }
> + return *this;
> + }
> +
I'm not familiar with C++, but is 'tmp' really needed here?
autosprintf& operator = (autosprintf& src)
{
std::swap (str, src.str);
return *this;
}
Regards,
--
Daiki Ueno
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, (continued)
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Daiki Ueno, 2013/03/04
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Miguel Ángel, 2013/03/04
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Daiki Ueno, 2013/03/04
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Miguel Ángel Arruga Vivas, 2013/03/05
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Daiki Ueno, 2013/03/05
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Miguel Ángel Arruga Vivas, 2013/03/06
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Didier Spaier, 2013/03/06
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Miguel Ángel Arruga Vivas, 2013/03/06
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Daiki Ueno, 2013/03/06
- Re: [bug-gettext] [Patch 2/2] Libasprintf bug fixes, Miguel Ángel Arruga Vivas, 2013/03/07
Re: [bug-gettext] [Patch 1/2] Libasprintf bug fixes,
Daiki Ueno <=