fix warnings from clazy with the default warning level
ClosedPublic

Authored by mgallien on Jun 2 2017, 7:22 PM.

Details

Summary

fix warnings from clazy with the default warning level

Test Plan

automatic tests still work as expected on Linux

Diff Detail

Repository
R286 KFileMetaData
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mgallien created this revision.Jun 2 2017, 7:22 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptJun 2 2017, 7:22 PM
apol added a subscriber: apol.Jun 2 2017, 10:22 PM

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

autotests/taglibextractortest.cpp
118

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. ^^'

mgallien updated this revision to Diff 15104.Jun 3 2017, 9:09 AM

replaced the at(0) by constFirst

In D6070#113705, @apol wrote:

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

I had missed the fact that the warnings where from clang and not clazy.
The compiler warns that the private class is first declared as a struct and later declared as a class ( -Wmismatched-tags is the warning flag from clang). I can remove those modifications if they are not desirable.

dfaure accepted this revision.Jun 3 2017, 9:45 AM
dfaure added a subscriber: dfaure.

"first declared as a struct and later declared as a class" must indeed be fixed. It's only a warning for clang, but AFAIK it leads to a hard error with MSVC. So yes, this all looks good to me.

This revision is now accepted and ready to land.Jun 3 2017, 9:45 AM
This revision was automatically updated to reflect the committed changes.