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

List:       kde-core-devel
Subject:    Re: KSharedPtr changes
From:       Michael Pyne <michael.pyne () kdemail ! net>
Date:       2006-01-15 6:38:21
Message-ID: 200601150138.21222.michael.pyne () kdemail ! net
[Download RAW message or body]


On Saturday 14 January 2006 08:05, André Wöbbeking wrote:
> On Saturday 14 January 2006 13:06, Boudewijn Rempt wrote:
> > On Saturday 14 January 2006 12:54, Michel Hermier wrote:
> > > One main disaventage of that is that we can't use the
> > > "KSharedPtr<Foo> foo = bar;" syntax.
> > > We must use the "KSharedPtr<Foo> foo(bar);" syntax.
> >
> > I'd hate that... We use this construction in so many places in Krita
> > that it's going to be decided unfun to convert it everywhere.
>
> It's worth this little inconvenience. The dangling pointer from Michel's
> example is much more anoying.

Have you guys actually tested that?  Unless I'm mistaken, in C++, *when 
constructing an object*, the Foo foo = bar; and Foo foo(bar); syntaxes are 
identical and equivalent.

I'll make up some test code and report back.

Regards,
 - Michael Pyne

[Attachment #3 (application/pgp-signature)]

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

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