refactor: Remove superfluous inline and register keywords with clang-tidy#1936
Conversation
bobtista
commented
Dec 1, 2025
- Used clang-tidy
|
Are we sure that VC6 treats I'd recommend running this change against a large number of replays. |
0629427 to
92878b7
Compare
Section 7.1.2: "A function defined within a class definition is an inline function." This means member functions defined inside class bodies are implicitly inline in C++98, regardless of the inline keyword. VC6 claims C++98 support, so it should follow this. How many replays does our CI check with? |
|
If they were not implict inline then it would compile error, because of duplicate symbol definitions. |
92878b7 to
c67addf
Compare
Yeah, do you want me to keep it? Only 2 lines had the register keyword removed in this branch- both are in the same function Get_Date_From_Day, in: The register keyword is just a hint that the compiler can ignore, even in VC6. It was deprecated in C++11 and removed in C++17, our CppMacros.h defines REGISTER as empty too. It's unrelated I suppose but also harmless. Up to you. |
I assume 9 replays https://github.com/TheSuperHackers/GeneralsReplays/tree/af0c61ccdccbf06750b0ecd2de99fe65842bfc1a |
|
This change only touched one file in all of the tools. Is this change complete or did it skip things? In total there are 5291 inline's in 510 files. |
Skyaero42
left a comment
There was a problem hiding this comment.
Tested against +- 100 replays from Gentool and gamereplays without issues.
|
Is this change complete or did it not process some of the project files? |
c67addf to
8fda3ad
Compare
|
Didn't this previously touch over a thousand lines? Now it touches less than 100. |
8fda3ad to
444c53e
Compare
Yes, those are back now. |