D6070: fix warnings from clazy with the default warning level

Aleix Pol Gonzalez noreply at phabricator.kde.org
Fri Jun 2 22:22:40 UTC 2017


apol added a comment.


  I am not super sure about the struct -> class. Why?

INLINE COMMENTS

> taglibextractortest.cpp:118
>      QCOMPARE(resultMpc.types().size(), 1);
> -    QCOMPARE(resultMpc.types().first(), Type::Audio);
> +    QCOMPARE(resultMpc.types().at(0), Type::Audio);
>  

Probably more elegant to use `constFirst` than `at(0)`.

FWIW note that in this case we're patching so the warning is gone (which is not bad per se) but it's not like the software will be much better after this change. ^^'

REPOSITORY
  R286 KFileMetaData

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

To: mgallien, #frameworks
Cc: apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170602/a09ef676/attachment.html>


More information about the Kde-frameworks-devel mailing list