Repository navigation
Conversation
Member
|
Maybe the prefixes in those enums should be renamed too, to match types renames? |
RC_TYPE (CServerConfig/CRegion), SC_TYPE (CServerDef/CSector) and WC_TYPE (CWebPageDef/CWorld) were defined with different contents in different translation units, which violates the One Definition Rule (GCC -Wodr with LTO). The local enums of CRegion.cpp, CSector.cpp and CWorld.cpp are renamed (REGC_TYPE, SECC_TYPE, WLDC_TYPE), and their values too, to match (REGC_*, SECC_*, WLDC_*). No functional change. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Sure, done: the values are renamed too, to match the types: RC_ → REGC_, SC_ → SECC_, WC_ → WLDC_. The same prefixes are used by other enums in CServerConfig.cpp, CServerDef.cpp and CWebPageDef.cpp, so this removes that ambiguity as well. I also rebased the branch on the current dev. |
DavideRei
force-pushed
the
fix/odr-enum-names
branch
from
November 29, 2026 09:03
2a0b89e to
09d85e9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
RC_TYPE (CServerConfig/CRegion), SC_TYPE (CServerDef/CSector) and WC_TYPE (CWebPageDef/CWorld) were defined with different contents in different translation units, which violates the One Definition Rule (GCC -Wodr with LTO). The local enums of CRegion.cpp, CSector.cpp and CWorld.cpp are renamed (REGC_TYPE, SECC_TYPE, WLDC_TYPE), and their values too, to match (REGC_*, SECC_*, WLDC_*). No functional change.
Type of Change
Related Issues
None.
Testing
Checklist
Additional Notes
None.
🤖 Generated with Claude Code