Skip to content

Mark override functions#1319

Open
tobil4sk wants to merge 5 commits intoHaxeFoundation:masterfrom
tobil4sk:fix/override-warnings
Open

Mark override functions#1319
tobil4sk wants to merge 5 commits intoHaxeFoundation:masterfrom
tobil4sk:fix/override-warnings

Conversation

@tobil4sk
Copy link
Member

@tobil4sk tobil4sk commented Mar 14, 2026

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.

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.
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