pingus-devel
[Top][All Lists]
Advanced

[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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]