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

List:       kde-devel
Subject:    Re: strings and QStrings
From:       David van Hoose <david-vh () home ! com>
Date:       2000-12-10 8:00:33
[Download RAW message or body]

Bo Thorsen wrote:
> 
> On Sat, 9 Dec 2000, Guillaume Laurent wrote:
> 
> > On Friday 08 December 2000 21:39, robbie wrote:
> >
> > > Thanks for the help I used
> > >
> > > QString defdrive=get_default_drive().c_str();
> >
> > For what it's worth,
> >
> > QString defdrive(get_default_drive().c_str());
> >
> > is a bit more efficient.
> 
> No it's not. You should write a bug report if the compiler doesn't do this
> implicitly. So which of the two you use in your code doesn't matter; the
> compiled code is the same. Personally I find the "=" version more readable.

The code for the operator should *NOT* implicitly be defined as a
constructor
as there may be other operations to be executed or not be.

-- 
-Dave
 
>> Visit http://master.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