pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intentional code?


From: Ingo Ruhnke
Subject: Re: Intentional code?
Date: 11 Oct 2002 22:19:40 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

David Philippi <address@hidden> writes:

> On Friday 11 October 2002 21:16, Neil Hotmail wrote:
> > PingusBug&
> > PingusBug::operator= (const PingusBug& old)
> > {
> >   if (this == &old);
> >     return *this;
> 
> What's strange to you at this code? 

Lets change the indention a bit:

PingusBug&
PingusBug::operator= (const PingusBug& old)
{
  if (this == &old);
  return *this;
  [...]

and now we remove a useless if-statement and finally we get:

PingusBug&
PingusBug::operator= (const PingusBug& old)
{
  return *this;
}

Well... I guess you know what is strange with it... I am going to fix
it.

-- 
WWW:      http://pingus.seul.org/~grumbel/ 
Games:    http://pingus.seul.org/~grumbel/gamedesigns/
JabberID: address@hidden 
ICQ:      59461927




reply via email to

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