Fix some style details in generation#1423
Conversation
|
Thanks! In my testing this fixes some of the style issues from the description, but creates some new ones. For example, with I diff'd the generated code between Here's the diff I generated, in case it's helpful: godot-cpp-pr-1423-diff.txt |
|
Thank you, will look at those cases, should be straightforward |
27a7b4f to
f2f973d
Compare
|
Should be good now! (Pushed on top of #1490 for the time being for conflicts) |
dsnopek
left a comment
There was a problem hiding this comment.
Thanks! All the changes this makes look good to me now :-)
There is at least one style issue this doesn't fix which I noticed while reviewing. I did a diff on the gen/ directory for before and after the last commit on this branch and noticed a missing space after const in a couple places, for example:
diff -Nur gen-old/src/variant/signal.cpp gen/src/variant/signal.cpp
--- gen-old/src/variant/signal.cpp 2024-06-17 16:32:02.756419960 -0500
+++ gen/src/variant/signal.cpp 2024-06-17 16:32:07.316546358 -0500
@@ -117,7 +117,7 @@
return internal::_call_builtin_method_ptr_ret<int8_t>(_method_bindings.method_is_null, (GDExtensionTypePtr)&opaque);
}
-Object *Signal::get_object() const{
+Object *Signal::get_object() const{
return internal::_call_builtin_method_ptr_ret_obj<Object>(_method_bindings.method_get_object, (GDExtensionTypePtr)&opaque);
}
However, the changes this PR makes are all positive, so we don't have to fix that here (unless you want to).
|
I'll see if I can find those, but I'm fine merging this and checking later, I'll push in a few hours if I do, otherwise I'll do it later |
f2f973d to
d0b63aa
Compare
|
Fixed! There are some other areas of style that might be improved in the future, will do some testing using Edit: Found a few more glaring cases I'll fix right now |
d0b63aa to
9fd5f8d
Compare
|
|
||
| method_signature = "\t" | ||
| if vararg: | ||
| method_signature += "private: " |
There was a problem hiding this comment.
This is already added by the make_signature method so was added doubly
9fd5f8d to
e7a13e3
Compare
dsnopek
left a comment
There was a problem hiding this comment.
Thanks! I skimmed through the diff of the generated code after the latest changes, and this is looking really great to me :-)
|
Thank you! Got some further fixes set up but still testing them and will open a PR when they are ready, they're more extensive but will (almost) make the generared code follow the style, i.e. won't be triggering anything in |
|
Cherry-picked for 4.2 in PR #1527 |
|
Cherry-picked for 4.1 in PR #1529 |
Some minor output fixes that I came across while fixing some other bugs, this would generate things like:
These are all now fixed