Skip to content

Fix C++Builder compile errors on V7 compatibility constants - #1401

Open
zencode1 wants to merge 5 commits into
JAM-Software:masterfrom
zencode1:cpp-v7-compatibility-constants
Open

zencode1 wants to merge 5 commits into
JAM-Software:masterfrom
zencode1:cpp-v7-compatibility-constants

Conversation

@zencode1

Copy link
Copy Markdown
Contributor

The V7 backward-compatibility constants in VirtualTrees.pas (e.g. ctNone = VirtualTrees.Types.TCheckType.ctNone) alias scoped enum members. Without telling the C++ header generator about that, C++Builder users encounter ambiguity compiler errors when these are translated to .hpp.

This PR adds, for each constant in VirtualTrees.pas:

  • {$EXTERNALSYM} - stops the .hpp generator from emitting a conflicting redeclaration for the symbol.
  • {$HPPEMIT} - restores the plain, unscoped C++ alias

Additional changes:

  • Grouped the constants by source enum with a comment for readability.
  • Fixed csMixedDisable -> csMixedDisabled (typo - didn't match the enum member it was meant to alias).
  • Removed the alignment spacing since it distracted from readability due to the grouped compiler directives

No runtime/behavior change - Delphi consumers are unaffected; this only fixes header generation for C++Builder.

Suggest any formatting changes if I didn't match the repository standards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant