diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-04-04 15:06:57 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-04-04 19:49:50 +0200 |
commit | f8ab79e68af20e18e1d868b64d6dfd0c429bc554 (patch) | |
tree | a9d2df2e2df939c189135b1c36a01e06b37b80b2 /editor/editor_help_search.h | |
parent | 53317bbe146dd19a919685df8d846c55568daba1 (diff) | |
download | redot-engine-f8ab79e68af20e18e1d868b64d6dfd0c429bc554.tar.gz |
Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
Diffstat (limited to 'editor/editor_help_search.h')
-rw-r--r-- | editor/editor_help_search.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/editor_help_search.h b/editor/editor_help_search.h index bf69fe1693..d89bb0959c 100644 --- a/editor/editor_help_search.h +++ b/editor/editor_help_search.h @@ -55,11 +55,11 @@ class EditorHelpSearch : public ConfirmationDialog { SEARCH_SHOW_HIERARCHY = 1 << 30 }; - LineEdit *search_box; - Button *case_sensitive_button; - Button *hierarchy_button; - OptionButton *filter_combo; - Tree *results_tree; + LineEdit *search_box = nullptr; + Button *case_sensitive_button = nullptr; + Button *hierarchy_button = nullptr; + OptionButton *filter_combo = nullptr; + Tree *results_tree = nullptr; bool old_search = false; String old_term; @@ -114,8 +114,8 @@ class EditorHelpSearch::Runner : public RefCounted { } }; - Control *ui_service; - Tree *results_tree; + Control *ui_service = nullptr; + Tree *results_tree = nullptr; String term; int search_flags; |