Skip to content

Mark override functions#1319

Merged
Aidan63 merged 6 commits into
HaxeFoundation:masterfrom
tobil4sk:fix/override-warnings
Jun 20, 2026
Merged

Mark override functions#1319
Aidan63 merged 6 commits into
HaxeFoundation:masterfrom
tobil4sk:fix/override-warnings

Conversation

@tobil4sk

@tobil4sk tobil4sk commented Mar 14, 2026

Copy link
Copy Markdown
Member

If c++11 is used, we need to mark override functions. For older c++ versions we just define the macro as empty.

Code that is only used for HXCPP_API_LEVEL 500 and above already requires c++11 as a minimum, so there we can just use the override keyword directly without the macro, as is already the case in some places.

To fully get rid of all warnings, we also need haxe to generate overrides where needed, i.e. HaxeFoundation/haxe#12840.

Closes #1318 and #1334.

Comment thread include/Array.h Outdated
If c++11 is used, we need to mark override functions. For older c++
versions we just define the macro as empty.

Code that is only used for HXCPP_API_LEVEL 500 and above already
requires c++11 as a minimum, so there we can just use the override
keyword directly without the macro, as is already the case in some
places.
The const markers did not match the definition in hx::Object, so they
were not overriding the parent class method correctly. If we remove them
then they can be marked as override.
Older versions of haxe do not generate overrides so they will keep
showing warnings. By omitting any overrides, we prevent these warnings
from showing up.
@Aidan63

Aidan63 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Can you resolve the conflicts? I'll merge once that's done.

@tobil4sk

Copy link
Copy Markdown
Member Author

Should be up-to-date now!

@Aidan63 Aidan63 merged commit 91db36b into HaxeFoundation:master Jun 20, 2026
133 checks passed
@tobil4sk tobil4sk deleted the fix/override-warnings branch June 21, 2026 07:45
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.

3 participants