[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kdeui/colors
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2007-06-25 15:10:53
Message-ID: 20070625151053.GC3165 () ghostdog ! localnet
[Download RAW message or body]


On Mon, Jun 25, 2007 at 10:19:18AM +0000, Dirk Mueller wrote:
> SVN commit 680033 by mueller:
Hi,

> --- trunk/KDE/kdelibs/kdeui/colors/kcolorscheme.cpp #680032:680033
> @@ -145,6 +145,12 @@
>      d = new KColorSchemePrivate(*other.d);
>  }
>  
> +KColorScheme& KColorScheme::operator=(const KColorScheme& other)
> +{
> +    delete d;
> +    d = new KColorSchemePrivate(*other.d);
> +}
> +
Shouldn't it be something like

KColorScheme& KColorScheme::operator=(const KColorScheme& other)
{
    if ( this != &other ) {
      delete d;
      d = new KColorSchemePrivate(*other.d);
    }

    return *this;
}

Ciao,
Tobias
-- 
Separate politics from religion and economy!
The Council of the European Union is an undemocratic and illegal institution!

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic