Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions binding_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl

result.append("")
result.append("#include <godot_cpp/core/defs.hpp>")
result.append("#include <godot_cpp/core/math_defs.hpp>")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little unsure about including this in every header for builtin classes.

Although, I guess we are already including it pretty widely, given that it's included in math.hpp which is included in some variant type headers (ex vector2.hpp) which are included all over.

If it weren't a big mess (which it probably would be), it'd be nice to be more targeted about this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would the alternative be? Directly using <limits>?

result.append("")

# Special cases.
Expand Down Expand Up @@ -2913,6 +2914,8 @@ def is_included(type_name, current_type):

def correct_default_value(value, type_name):
value_map = {
"inf": "Math::INF",
"nan": "Math::NaN",
"null": "nullptr",
'""': "String()",
'&""': "StringName()",
Expand Down
Loading