D29138: [Solid] Replace foreach (deprecated) with range/index for

Stefan BrĂ¼ns noreply at phabricator.kde.org
Thu Apr 23 23:51:24 BST 2020


bruns added inline comments.

INLINE COMMENTS

> fakecdrom.cpp:48
> +
> +    for (auto it = map.cbegin(); it != map.cend(); ++it) {
> +        if (supported_medialist.contains(it.value())) {

The obviously better solution is to iterate over `supported_medialist` and swap the key and value of the map.

REPOSITORY
  R245 Solid

BRANCH
  l-foreach (branched from master)

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

To: ahmadsamir, #frameworks, dfaure, apol, meven
Cc: bruns, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200423/891d029b/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list