Closed mihe closed 1 month ago
Cherry-picked for 4.3 in PR https://github.com/godotengine/godot-cpp/pull/1569
Cherry-picked for 4.2 in PR https://github.com/godotengine/godot-cpp/pull/1570
Cherry-picked for 4.1 in PR https://github.com/godotengine/godot-cpp/pull/1572
Fixes #1556.
This fixes the generation of
operator!
,operator&&
andoperator||
, as they were not being mapped correctly from theirextension_api.json
name ofnot
,and
andor
respectively, resulting in them showing up asoperatornot
,operatorand
andoperatoror
respectively.Note that
operatorand
andoperatoror
never actually showed up anywhere in the generated C++ headers, as they only exist on built-in types inextension_api.json
currently.I also fixed another related issue, which is that the
**
operator wasn't being skipped like thein
andxor
operators have been until now, neither of which make no sense in C++ of course. This is now done through a new helper function calledis_valid_cpp_operator
.I suppose this is technically a breaking change, so I'm not sure if there's perhaps some argument for leaving the old
operatornot
methods intact.