D24261: Modernize code: use range-based for loop in more places

David Faure noreply at phabricator.kde.org
Sat Sep 28 14:30:54 BST 2019


dfaure added inline comments.

INLINE COMMENTS

> kossebau wrote in kgesture.cpp:131
> Why the sizeof==8 rule?
> 
> Good catch about the 1, slipped me, will drop change here.

sizeof(QPoint)==8 indeed, i.e. passing a QPoint by value is like passing two ints by value, which is fine.

> kossebau wrote in ktoolbar.cpp:187
> values detaches as before (where by use of non-const operator[]),now by internal use of begin()/end(), but this is fine, no? The "original" one is the class member `values` itself, so where do you see a non-original one?

Yeah this is equivalent to begin()/end() and `*it = Unset`, it's fine.

REPOSITORY
  R263 KXmlGui

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

To: kossebau, dfaure
Cc: dhaumann, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190928/450ef7dc/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list