From f851c4aa330e1064a66db50be62db2466f4fb768 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Tue, 5 Apr 2022 13:40:26 +0300 Subject: Fix some issues found by cppcheck. --- editor/editor_node.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'editor/editor_node.cpp') diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 0cd07333ea..a80c7853f5 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3854,7 +3854,7 @@ void EditorNode::add_io_error(const String &p_error) { } void EditorNode::_load_error_notify(void *p_ud, const String &p_text) { - EditorNode *en = (EditorNode *)p_ud; + EditorNode *en = static_cast(p_ud); en->load_errors->add_image(en->gui_base->get_theme_icon(SNAME("Error"), SNAME("EditorIcons"))); en->load_errors->add_text(p_text + "\n"); en->load_error_dialog->popup_centered_ratio(0.5); @@ -4261,7 +4261,7 @@ void EditorNode::_copy_warning(const String &p_str) { void EditorNode::_dock_floating_close_request(Control *p_control) { // Through the MarginContainer to the Window. - Window *window = (Window *)p_control->get_parent()->get_parent(); + Window *window = static_cast(p_control->get_parent()->get_parent()); int window_slot = window->get_meta("dock_slot"); p_control->get_parent()->remove_child(p_control); @@ -5773,7 +5773,7 @@ static Node *_resource_get_edited_scene() { } void EditorNode::_print_handler(void *p_this, const String &p_string, bool p_error) { - EditorNode *en = (EditorNode *)p_this; + EditorNode *en = static_cast(p_this); en->log->add_message(p_string, p_error ? EditorLog::MSG_TYPE_ERROR : EditorLog::MSG_TYPE_STD); } -- cgit v1.2.3