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:
parent
53317bbe14
commit
f8ab79e68a
258 changed files with 2398 additions and 2421 deletions
|
|
@ -67,20 +67,20 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
Button *activate;
|
||||
Button *clear_button;
|
||||
Button *activate = nullptr;
|
||||
Button *clear_button = nullptr;
|
||||
|
||||
TextureRect *graph;
|
||||
TextureRect *graph = nullptr;
|
||||
Ref<ImageTexture> graph_texture;
|
||||
Vector<uint8_t> graph_image;
|
||||
Tree *variables;
|
||||
HSplitContainer *h_split;
|
||||
CheckBox *frame_relative;
|
||||
CheckBox *linked;
|
||||
Tree *variables = nullptr;
|
||||
HSplitContainer *h_split = nullptr;
|
||||
CheckBox *frame_relative = nullptr;
|
||||
CheckBox *linked = nullptr;
|
||||
|
||||
OptionButton *display_mode;
|
||||
OptionButton *display_mode = nullptr;
|
||||
|
||||
SpinBox *cursor_metric_edit;
|
||||
SpinBox *cursor_metric_edit = nullptr;
|
||||
|
||||
Vector<Metric> frame_metrics;
|
||||
int last_metric;
|
||||
|
|
@ -99,8 +99,8 @@ private:
|
|||
|
||||
bool seeking;
|
||||
|
||||
Timer *frame_delay;
|
||||
Timer *plot_delay;
|
||||
Timer *frame_delay = nullptr;
|
||||
Timer *plot_delay = nullptr;
|
||||
|
||||
void _update_frame(bool p_focus_selected = false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue