const T& func() const;

Jos van den Oever jvdoever at gmail.com
Thu Aug 16 20:50:43 BST 2007


2007/8/16, Robert Knight <robertknight at gmail.com>:
> > and what's the preformance impact?
>
> Zero surely?  For implicitly shared classes ( which KFileMetaInfo is
> ), the only cost is a pointer copy and reference increment I believe.
>
> And yes, the plan was definitely to go const T& -> T.

Exactly, I'm the one that ported it in that direction on insistence of
various other devs. Impact should be small, since QSharedDataPointer
has been optimized rather well.

Cheers,
Jos




More information about the kde-core-devel mailing list