diff options
author | Rafał Mikrut <mikrutrafal@protonmail.com> | 2020-11-24 10:12:55 +0100 |
---|---|---|
committer | Rafał Mikrut <mikrutrafal@protonmail.com> | 2020-12-02 16:09:11 +0100 |
commit | e1811b689b6854668ca690831df8603820b68573 (patch) | |
tree | b13641bf9a704ec71f8ac90f3dd8d41a1174ae04 /editor/plugins/canvas_item_editor_plugin.h | |
parent | d1231be1c8f8f2c16fd1047adcd3c7f997a07c1f (diff) |
Initialize class/struct variables with default values in platform/ and editor/
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.h')
-rw-r--r-- | editor/plugins/canvas_item_editor_plugin.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 859e80befe..c4a1dca593 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -288,9 +288,9 @@ private: MenuOption last_option; struct _SelectResult { - CanvasItem *item; - float z_index; - bool has_z; + CanvasItem *item = nullptr; + float z_index = 0; + bool has_z = true; _FORCE_INLINE_ bool operator<(const _SelectResult &p_rr) const { return has_z && p_rr.has_z ? p_rr.z_index < z_index : p_rr.has_z; } @@ -308,8 +308,6 @@ private: Transform2D xform; float length = 0.f; uint64_t last_pass = 0; - - BoneList() {} }; uint64_t bone_last_frame; @@ -331,7 +329,7 @@ private: struct PoseClipboard { Vector2 pos; Vector2 scale; - float rot; + float rot = 0; ObjectID id; }; List<PoseClipboard> pose_clipboard; |