-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize class/struct variables with default values in platform/ and editor/ #43742
Initialize class/struct variables with default values in platform/ and editor/ #43742
Conversation
0c1a9d7
to
20444f9
Compare
20444f9
to
e1811b6
Compare
@@ -81,6 +81,8 @@ GotoLineDialog::GotoLineDialog() { | |||
register_text_enter(line); | |||
text_editor = nullptr; | |||
|
|||
line_label = nullptr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one and the text_editor
assignment would be better in the header.
@@ -626,6 +626,8 @@ DependencyErrorDialog::DependencyErrorDialog() { | |||
vb->add_child(text); | |||
text->set_text(TTR("Which action should be taken?")); | |||
|
|||
mode = Mode::MODE_RESOURCE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move to header declaration.
@@ -963,6 +963,7 @@ EditorProperty::EditorProperty() { | |||
selected_focusable = -1; | |||
label_reference = nullptr; | |||
bottom_editor = nullptr; | |||
delete_hover = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All those should be moved to the header (but that's maybe out of scope of this PR, see #38697).
const char *path = nullptr; | ||
uint32_t keycode = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually unused and removed in #44128, so you might as well leave it out to avoid conflicts.
Let's merge as is, the initializations in constructor for |
Thanks! |
Part of #43636
Number of errors decreased by 77 (812 -> 735)