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
|
|
@ -39,8 +39,8 @@
|
|||
class TextureLayeredEditor : public Control {
|
||||
GDCLASS(TextureLayeredEditor, Control);
|
||||
|
||||
SpinBox *layer;
|
||||
Label *info;
|
||||
SpinBox *layer = nullptr;
|
||||
Label *info = nullptr;
|
||||
Ref<TextureLayered> texture;
|
||||
|
||||
Ref<Shader> shaders[3];
|
||||
|
|
@ -48,7 +48,7 @@ class TextureLayeredEditor : public Control {
|
|||
|
||||
float x_rot = 0;
|
||||
float y_rot = 0;
|
||||
Control *texture_rect;
|
||||
Control *texture_rect = nullptr;
|
||||
|
||||
void _make_shaders();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue