diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
commit | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (patch) | |
tree | 894c5070a709198ed994db7c7d0c0e124abbc9e5 /editor/plugins/animation_state_machine_editor.cpp | |
parent | 5c66771e3ebccdfec55bb94ea521d2f24cb6200a (diff) |
Some code changed with Clang-Tidy
Diffstat (limited to 'editor/plugins/animation_state_machine_editor.cpp')
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index e25e7ac7ed..bc22d9315e 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -1094,7 +1094,7 @@ void AnimationNodeStateMachineEditor::_removed_from_graph() { void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) { - String new_name = p_text; + const String &new_name = p_text; ERR_FAIL_COND(new_name == "" || new_name.find(".") != -1 || new_name.find("/") != -1); @@ -1102,7 +1102,7 @@ void AnimationNodeStateMachineEditor::_name_edited(const String &p_text) { return; // Nothing to do. } - String base_name = new_name; + const String &base_name = new_name; int base = 1; String name = base_name; while (state_machine->has_node(name)) { @@ -1365,7 +1365,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { error_panel->add_child(error_label); error_panel->hide(); - undo_redo = EditorNode::get_singleton()->get_undo_redo(); + undo_redo = EditorNode::get_undo_redo(); set_custom_minimum_size(Size2(0, 300 * EDSCALE)); @@ -1390,7 +1390,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() { open_file->set_title(TTR("Open Animation Node")); open_file->set_mode(EditorFileDialog::MODE_OPEN_FILE); open_file->connect("file_selected", this, "_file_opened"); - undo_redo = EditorNode::get_singleton()->get_undo_redo(); + undo_redo = EditorNode::get_undo_redo(); over_text = false; |