kossebau added inline comments.

INLINE COMMENTS

> zzag wrote in kwindowsystem_threadtest.cpp:61
> I asked that because `for (const Type &item : collection) {` is more common. 
> I know that const ref doesn't have any advantages here.

(Gah, phab ate this comment before, rewriting)
Getting the item by value though is also common, for types which are trivially 
copyable and fit in cpu registers on usual hardware. Which is some ยต-opt that 
might make sense to get used to as code pattern by using it as default in such 
cases, to approach what they call "premature pessimation".
Your code though and not performance crititcal, so doing as you prefer.

REPOSITORY
  R278 KWindowSystem

REVISION DETAIL
  https://phabricator.kde.org/D23839

To: kossebau, #kwin, zzag
Cc: aacid, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

Reply via email to