Code review comment for lp:~compiz-team/compiz/compiz.fix_1015151.1

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Since rects is now outside the for loop, you can safely convert it to a reference:
  CompRect::vector &rects (rem.rects ());

Then it becomes a reference to a temporary that is not destroyed till the end of the block/function. And that way only 2 temporary vectors are created (one inside rects() and one outside). In its current form, 3 temporary vectors could be created. Though its possible gcc will sometimes optimize that to 2...

review: Needs Fixing

« Back to merge proposal