-
Notifications
You must be signed in to change notification settings - Fork 126
refactor: Apply the readability-container-size-empty check with clang-tidy #1957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Apply the readability-container-size-empty check with clang-tidy #1957
Conversation
d87241f to
9174538
Compare
xezon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement. With std::list from STLPort this can give small performance gains too.
|
Is this change complete or is it still missing checks from files it previously failed on? |
603abdc to
0226774
Compare
I ran it again, it should have all the changes it's going to find for now. |
|
If you search in Visual Studio with regex query |
|
Maybe clang tidy is not good enough and we always need a manual pass as well. |
|
I think there are lots of files that it skips, and some files require multiple runs. It takes me 30min+ on my windows machine to run it on the repo, though I try to do things like output the files it touches for a given check and then only rerun it on those files. I think in order to be 100% done with a check yes we should check manually after running the tool. After mfc is removed it will cover more files for example |
|
Ok then how about we do a clang-tidy run and then afterwards do another scripted or manual pass to fix whatever it has missed. So essentially it would be good to improve the same kind of thing across all files and not be at the mercy of clang-tidy to find it for us, but just help us kick it off. As Caball009 has shown, we can regex search to find more occurences and then fix them. |
…dability-container-size-empty)
e4b0502 to
c0d4788
Compare
|
Fixed the remaining ones I could find, rebased main |
Generals/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DModelDraw.h
Outdated
Show resolved
Hide resolved
GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/Module/W3DModelDraw.h
Outdated
Show resolved
Hide resolved
cc8874e to
ee3bf58
Compare
xezon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks all correct. I did not look if this is complete.
|
I see zero remaining cases for that regex query, so I presume all cases have been taken care of. |
Ran clang-tidy (readability-container-size-empty))