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

List:       kde-devel
Subject:    RE: Philosophical question
From:       Paulo Jorge Guedes <Paulo.Guedes () artelecom ! pt>
Date:       2006-11-17 15:02:17
Message-ID: 638DECE198A2DC4BB66AC74BD51097CC7C8504 () SRVEXC02 ! corp ! artelecom ! pt
[Download RAW message or body]

> -----Original Message-----
> From: Remi Villatel [mailto:maxilys@tele2.fr]
> Sent: sexta-feira, 17 de Novembro de 2006 14:55
> To: KDE Devel
> Subject: Philosophical question
> 
> Hi list,
> 
> Let's imagine we have: thatThing.isA("QSomeThing") == true.
> 
> Now, what are the differences in between
> 
> QSomeThing anotherOne = thatThing;

1. This initializes anotherOner with the default constructor and then
assigns to thatThing

> and
> 
> QSomeThing anotherOne(thatThing);

2. This initializes anotherOne with copy constructor using thatThing

In theory 2. would be faster but maybe the compiler optimizes 1. so it
can be the same as 2. 
I'm not sure and would be glad to know :)

Paulo

> ?
> 
> I was reviewing some code with Kate's colorization scheme for Qt from
> I-couldn't-retrieve-who and I noticed I was inconsistent in my coding
> style
> for no reason. (And so are KDE libs. So I couldn't use them as source
or
> inspiration.)
> 
> I haven't tested to switch entirely to one way or to the other, so I
> wonder
> what the pros and cons are. I'm especially interested in the speed
related
> consequences for my style.
> 
> (I hope this is not a motive of another holy war...)  ;-)
> 
> See you,
> 
> --
> ==================
> Remi Villatel
> maxilys_@_tele2.fr
> ==================
> 
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> unsubscribe <<
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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