D19326: [Kconfig] Compile without foreach

David Faure noreply at phabricator.kde.org
Wed Feb 27 23:32:47 GMT 2019


dfaure requested changes to this revision.
dfaure added a comment.
This revision now requires changes to proceed.


  Did you check that unittests still pass?  (please mention this in the "Test Plan:" field of the commit when using arc diff)

INLINE COMMENTS

> ksharedconfig.cpp:93
>  
> -    foreach (auto cfg, *static_cast<const GlobalSharedConfigList*>(list)) {
> +    const auto listConf = *static_cast<const GlobalSharedConfigList*>(list);
> +    for (auto cfg : listConf) {

This looks like a poor man's qAsConst.
Would this work with

  for (auto cfg : qAsConst(*list)) {

?
(not sure)

REPOSITORY
  R237 KConfig

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

To: mlaurent, dfaure
Cc: kde-frameworks-devel, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190227/8f73ccd6/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list