Smart pointers and color strategies

Boudewijn Rempt boud at
Sun Jul 31 19:58:05 CEST 2005

On Sunday 31 July 2005 19:52, Casper Boemann wrote:
> On Sunday 31 July 2005 19:46, Boudewijn Rempt wrote:
> > Since we basicallly have only one copy of each color strategy, and since
> > we don't want to delete that copy ever -- why do we actually use smart
> > pointers for color strategies? With Krita going to the color strategy for
> > every little pixel computation, wouldn't it be smarter to use plain
> > pointers and not have the overhead of smart pointers?
> good point
> I'm not sure the overhead is that big, but I'm all for it.

I don't know either, but it's an extra function call, isn't it?

const T* operator->() const { return ptr; }

Maybe the compiler smartly inlines this...

Anyway, would it be as simple as 

perl -p -i -e's/KisStrategyColorSpaceSP/KisStrategyColorSpace\*/g'? It's worth 
a try, but first I'm going to see if I can find out why filling a selection 
hangs on the completely innocent line

 m_writable = writable;

in the tiledhline iterator constructor...

Boudewijn Rempt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url :

More information about the kimageshop mailing list