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.
This commit is contained in:
@ -38,11 +38,11 @@
|
||||
class SpinBox : public Range {
|
||||
GDCLASS(SpinBox, Range);
|
||||
|
||||
LineEdit *line_edit;
|
||||
LineEdit *line_edit = nullptr;
|
||||
int last_w = 0;
|
||||
bool update_on_text_changed = false;
|
||||
|
||||
Timer *range_click_timer;
|
||||
Timer *range_click_timer = nullptr;
|
||||
void _range_click_timeout();
|
||||
void _release_mouse();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user