Code review comment for lp:~smspillaz/compiz-core/fix_896586_rotate_plugin

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> > CompPoint remainingVp = CompPoint (screen->vpSize ().width () - wvp.x (),
> > screen->vpSize ().height () - wvp.y ());
>
> This is an inefficient way to write:
>
>
> CompPoint remainingVp (screen->vpSize ().width () - wvp.x (),
> screen->vpSize ().height () - wvp.y ());
>
> The first way calls the constructor, then the copy constructor, then the
> destructor just to initialize remainingVp.

I'm suprised the compiler doesn't optimize that out.

>
> Please just use a constructor call. Please fix declarations in
> compiz::viewports::wraparoundOffsetForPoint.

ack

« Back to merge proposal