From 10718b096100b61b9cfcf0e668af7b94f4bbe00a Mon Sep 17 00:00:00 2001 From: Simon Wenner Date: Thu, 4 Oct 2018 00:58:37 +0200 Subject: Fix some cppcheck errors cppcheck: fix broken pre-processor statement cppcheck: fix Uninitialized struct members in canvas editor plugin cppcheck: fix uninitialized struct member: method_api.is_virtual --- core/rid.h | 1 - editor/plugins/canvas_item_editor_plugin.h | 4 ++++ modules/gdnative/nativescript/api_generator.cpp | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/core/rid.h b/core/rid.h index fbb3e443fc..81d5b45d21 100644 --- a/core/rid.h +++ b/core/rid.h @@ -118,7 +118,6 @@ protected: p_rid._data->_owner = NULL; } -# #endif public: diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h index 6a788692d7..4f8cc6ab5e 100644 --- a/editor/plugins/canvas_item_editor_plugin.h +++ b/editor/plugins/canvas_item_editor_plugin.h @@ -280,6 +280,10 @@ private: Transform2D xform; float length; uint64_t last_pass; + + BoneList() : + length(0.f), + last_pass(0) {} }; uint64_t bone_last_frame; diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp index 0983c12619..8c6dace847 100644 --- a/modules/gdnative/nativescript/api_generator.cpp +++ b/modules/gdnative/nativescript/api_generator.cpp @@ -292,6 +292,7 @@ List generate_c_api_classes() { method_api.has_varargs = method_bind && method_bind->is_vararg(); // Method flags + method_api.is_virtual = false; if (method_info.flags) { const uint32_t flags = method_info.flags; method_api.is_editor = flags & METHOD_FLAG_EDITOR; -- cgit v1.2.3