-
Notifications
You must be signed in to change notification settings - Fork 124
refactor: Remove superfluous inline and register keywords #1936
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
base: main
Are you sure you want to change the base?
refactor: Remove superfluous inline and register keywords #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. |
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.
It also removed register keyword.
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 |