mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
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
|
|
@ -48,10 +48,10 @@ class ShaderFileEditor : public PanelContainer {
|
|||
|
||||
Ref<RDShaderFile> shader_file;
|
||||
|
||||
HBoxContainer *stage_hb;
|
||||
ItemList *versions;
|
||||
HBoxContainer *stage_hb = nullptr;
|
||||
ItemList *versions = nullptr;
|
||||
Button *stages[RD::SHADER_STAGE_MAX];
|
||||
RichTextLabel *error_text;
|
||||
RichTextLabel *error_text = nullptr;
|
||||
|
||||
void _update_version(const StringName &p_version_txt, const RenderingDevice::ShaderStage p_stage);
|
||||
void _version_selected(int p_stage);
|
||||
|
|
@ -74,8 +74,8 @@ public:
|
|||
class ShaderFileEditorPlugin : public EditorPlugin {
|
||||
GDCLASS(ShaderFileEditorPlugin, EditorPlugin);
|
||||
|
||||
ShaderFileEditor *shader_editor;
|
||||
Button *button;
|
||||
ShaderFileEditor *shader_editor = nullptr;
|
||||
Button *button = nullptr;
|
||||
|
||||
public:
|
||||
virtual String get_name() const override { return "ShaderFile"; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue