[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intentional code?
From: |
David Philippi |
Subject: |
Re: Intentional code? |
Date: |
Fri, 11 Oct 2002 22:34:34 +0200 |
User-agent: |
KMail/1.4.1 |
On Friday 11 October 2002 22:19, Ingo Ruhnke wrote:
> and now we remove a useless if-statement and finally we get:
> Well... I guess you know what is strange with it... I am going to fix
> it.
Ah, I didn't look into the code, just into the mail. The problem stems from
the fact that in examples there's mostly
if (this == &old)
return *this;
... assign ...
return *this;
For most simple assignment operators
if (this != &old)
{
... assign...
}
return *this;
is the better solution IMHO. Implementing what's offered in an expert book
unchanged doesn't need to be the best solution... ;-)
Bye David
- Re: Intentional code?, (continued)
- Re: Intentional code?, David Philippi, 2002/10/11
- Re: Intentional code?, David Philippi, 2002/10/11
- Re: Intentional code?, Neil Hotmail, 2002/10/11
- XMLhelper::parse_bool needed?, Neil Hotmail, 2002/10/11
- Re: XMLhelper::parse_bool needed?, David Philippi, 2002/10/11
- Re: XMLhelper::parse_bool needed?, Neil Hotmail, 2002/10/11
- Re: XMLhelper::parse_bool needed?, Ingo Ruhnke, 2002/10/11
- Re: Intentional code?, Neil Hotmail, 2002/10/11
- Re: Intentional code?, David Philippi, 2002/10/11
- Re: Intentional code?, Ingo Ruhnke, 2002/10/11
- Re: Intentional code?,
David Philippi <=
- Re: Intentional code?, David Philippi, 2002/10/11