summaryrefslogtreecommitdiffstats
path: root/editor/plugins/animation_tree_player_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-06-27 01:05:18 +0200
committerGitHub <noreply@github.com>2019-06-27 01:05:18 +0200
commiteaaff9da3178fa515a0f051fda932c1dd04d53db (patch)
tree56173535c376e0324f89baccf4bc14b2580ead23 /editor/plugins/animation_tree_player_editor_plugin.cpp
parentd8c96461183f0dc3208c3d624674fa4544212ea5 (diff)
parent4e5310cc60dc17e5ef09e57115ca8236544679e4 (diff)
downloadredot-engine-eaaff9da3178fa515a0f051fda932c1dd04d53db.tar.gz
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
Diffstat (limited to 'editor/plugins/animation_tree_player_editor_plugin.cpp')
-rw-r--r--editor/plugins/animation_tree_player_editor_plugin.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/editor/plugins/animation_tree_player_editor_plugin.cpp b/editor/plugins/animation_tree_player_editor_plugin.cpp
index f5d21ffb26..c99ad7f441 100644
--- a/editor/plugins/animation_tree_player_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_player_editor_plugin.cpp
@@ -511,9 +511,7 @@ void AnimationTreePlayerEditor::_draw_node(const StringName &p_node) {
font->draw_halign(ci, ofs + ascofs, HALIGN_CENTER, w, p_node, font_color);
ofs.y += h;
- int count = 2; // title and name
int inputs = anim_tree->node_get_input_count(p_node);
- count += inputs ? inputs : 1;
float icon_h_ofs = Math::floor((font->get_height() - slot_icon->get_height()) / 2.0) + 1;
@@ -618,7 +616,7 @@ AnimationTreePlayerEditor::ClickType AnimationTreePlayerEditor::_locate_click(co
for (const List<StringName>::Element *E = order.back(); E; E = E->prev()) {
- StringName node = E->get();
+ const StringName &node = E->get();
AnimationTreePlayer::NodeType type = anim_tree->node_get_type(node);