Skip to content
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

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

qarmin
Copy link
Contributor

@qarmin qarmin commented Nov 21, 2020

Part of #43636

Number of errors decreased by 77 (812 -> 735)

@qarmin qarmin force-pushed the editor_modules_default_values branch from 20444f9 to e1811b6 Compare December 2, 2020 15:10
@@ -81,6 +81,8 @@ GotoLineDialog::GotoLineDialog() {
register_text_enter(line);
text_editor = nullptr;

line_label = nullptr;
Copy link
Member

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;
Copy link
Member

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;
Copy link
Member

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

Comment on lines +1543 to +1544
const char *path = nullptr;
uint32_t keycode = 0;
Copy link
Member

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.

@akien-mga
Copy link
Member

Let's merge as is, the initializations in constructor for editor/ still need to be ported to the headers as done for core/ in #38697, but that's for another PR.

@akien-mga akien-mga merged commit 90bdba5 into godotengine:master Dec 8, 2020
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants