Fix some issues found by cppcheck.

This commit is contained in:
bruvzg 2022-04-05 13:40:26 +03:00
parent 72407a9cfb
commit f851c4aa33
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
163 changed files with 776 additions and 767 deletions

View file

@ -38,7 +38,7 @@
#include "scene/resources/font.h"
void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, bool p_editor_notify, ErrorHandlerType p_type) {
EditorLog *self = (EditorLog *)p_self;
EditorLog *self = static_cast<EditorLog *>(p_self);
if (self->current != Thread::get_caller_id()) {
return;
}
@ -216,7 +216,7 @@ void EditorLog::set_tool_button(Button *p_tool_button) {
}
void EditorLog::_undo_redo_cbk(void *p_self, const String &p_name) {
EditorLog *self = (EditorLog *)p_self;
EditorLog *self = static_cast<EditorLog *>(p_self);
self->add_message(p_name, EditorLog::MSG_TYPE_EDITOR);
}