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/animation_track_editor.cpp | |
| parent | d1231be1c8f8f2c16fd1047adcd3c7f997a07c1f (diff) | |
| download | redot-engine-e1811b689b6854668ca690831df8603820b68573.tar.gz | |
Initialize class/struct variables with default values in platform/ and editor/
Diffstat (limited to 'editor/animation_track_editor.cpp')
| -rw-r--r-- | editor/animation_track_editor.cpp | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp index b1ffb1dc52..717e4628ae 100644 --- a/editor/animation_track_editor.cpp +++ b/editor/animation_track_editor.cpp @@ -44,7 +44,7 @@ class AnimationTrackKeyEdit : public Object { GDCLASS(AnimationTrackKeyEdit, Object); public: - bool setting; + bool setting = false; bool _hide_script_from_inspector() { return true; @@ -622,15 +622,15 @@ public: } } - UndoRedo *undo_redo; + UndoRedo *undo_redo = nullptr; Ref<Animation> animation; - int track; - float key_ofs; - Node *root_path; + int track = -1; + float key_ofs = 0; + Node *root_path = nullptr; PropertyInfo hint; NodePath base; - bool use_fps; + bool use_fps = false; void notify_change() { _change_notify(); @@ -644,21 +644,13 @@ public: use_fps = p_enable; _change_notify(); } - - AnimationTrackKeyEdit() { - use_fps = false; - key_ofs = 0; - track = -1; - setting = false; - root_path = nullptr; - } }; class AnimationMultiTrackKeyEdit : public Object { GDCLASS(AnimationMultiTrackKeyEdit, Object); public: - bool setting; + bool setting = false; bool _hide_script_from_inspector() { return true; @@ -1276,11 +1268,11 @@ public: Map<int, NodePath> base_map; PropertyInfo hint; - Node *root_path; + Node *root_path = nullptr; - bool use_fps; + bool use_fps = false; - UndoRedo *undo_redo; + UndoRedo *undo_redo = nullptr; void notify_change() { _change_notify(); @@ -1294,12 +1286,6 @@ public: use_fps = p_enable; _change_notify(); } - - AnimationMultiTrackKeyEdit() { - use_fps = false; - setting = false; - root_path = nullptr; - } }; void AnimationTimelineEdit::_zoom_changed(double) { @@ -4669,10 +4655,10 @@ void AnimationTrackEditor::_move_selection(float p_offset) { } struct _AnimMoveRestore { - int track; - float time; + int track = 0; + float time = 0; Variant key; - float transition; + float transition = 0; }; //used for undo/redo |
