Fix unitialized variables
This commit is contained in:
parent
23955fc282
commit
d86510a83c
|
@ -2467,6 +2467,8 @@ void _Directory::_bind_methods() {
|
|||
|
||||
_Directory::_Directory() {
|
||||
d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
_list_skip_navigational = false;
|
||||
_list_skip_hidden = false;
|
||||
}
|
||||
|
||||
_Directory::~_Directory() {
|
||||
|
|
|
@ -248,6 +248,7 @@ ClassDB::ClassInfo::ClassInfo() {
|
|||
inherits_ptr = nullptr;
|
||||
disabled = false;
|
||||
exposed = false;
|
||||
class_ptr = nullptr;
|
||||
}
|
||||
|
||||
ClassDB::ClassInfo::~ClassInfo() {
|
||||
|
|
|
@ -129,6 +129,7 @@ void HashingContext::_bind_methods() {
|
|||
|
||||
HashingContext::HashingContext() {
|
||||
ctx = nullptr;
|
||||
type = HashType::HASH_MD5;
|
||||
}
|
||||
|
||||
HashingContext::~HashingContext() {
|
||||
|
|
|
@ -237,6 +237,7 @@ Engine::Engine() {
|
|||
_frame_step = 0;
|
||||
editor_hint = false;
|
||||
_portals_active = false;
|
||||
_occlusion_culling_active = false;
|
||||
}
|
||||
|
||||
Engine::Singleton::Singleton(const StringName &p_name, Object *p_ptr) :
|
||||
|
|
|
@ -375,6 +375,7 @@ Error FileAccessCompressed::_set_unix_permissions(const String &p_file, uint32_t
|
|||
FileAccessCompressed::FileAccessCompressed() :
|
||||
cmode(Compression::MODE_ZSTD),
|
||||
writing(false),
|
||||
write_pos(0),
|
||||
write_ptr(nullptr),
|
||||
write_buffer_size(0),
|
||||
write_max(0),
|
||||
|
|
|
@ -296,6 +296,8 @@ Error FileAccessEncrypted::_set_unix_permissions(const String &p_file, uint32_t
|
|||
|
||||
FileAccessEncrypted::FileAccessEncrypted() {
|
||||
file = nullptr;
|
||||
base = 0;
|
||||
length = 0;
|
||||
pos = 0;
|
||||
eofed = false;
|
||||
mode = MODE_MAX;
|
||||
|
|
|
@ -181,4 +181,6 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src, uint64_t p_length) {
|
|||
|
||||
FileAccessMemory::FileAccessMemory() {
|
||||
data = nullptr;
|
||||
length = 0;
|
||||
pos = 0;
|
||||
}
|
||||
|
|
|
@ -764,6 +764,7 @@ HTTPClient::HTTPClient() {
|
|||
chunk_trailer_part = false;
|
||||
response_num = 0;
|
||||
ssl = false;
|
||||
ssl_verify_host = false;
|
||||
blocking = false;
|
||||
handshaking = false;
|
||||
// 64 KiB by default (favors fast download speeds at the cost of memory usage).
|
||||
|
|
|
@ -359,6 +359,8 @@ PacketPeerUDP::PacketPeerUDP() :
|
|||
udp_server(nullptr),
|
||||
_sock(Ref<NetSocket>(NetSocket::create())) {
|
||||
rb.resize(16);
|
||||
memset(recv_buffer, 0, sizeof(recv_buffer));
|
||||
memset(packet_buffer, 0, sizeof(packet_buffer));
|
||||
}
|
||||
|
||||
PacketPeerUDP::~PacketPeerUDP() {
|
||||
|
|
|
@ -174,6 +174,7 @@ Error PCKPacker::flush(bool p_verbose) {
|
|||
|
||||
PCKPacker::PCKPacker() {
|
||||
file = nullptr;
|
||||
alignment = 0;
|
||||
};
|
||||
|
||||
PCKPacker::~PCKPacker() {
|
||||
|
|
|
@ -917,7 +917,9 @@ String ResourceInteractiveLoaderBinary::recognize(FileAccess *p_f) {
|
|||
|
||||
ResourceInteractiveLoaderBinary::ResourceInteractiveLoaderBinary() :
|
||||
translation_remapped(false),
|
||||
ver_format(0),
|
||||
f(nullptr),
|
||||
importmd_ofs(0),
|
||||
error(OK),
|
||||
stage(0) {
|
||||
}
|
||||
|
|
|
@ -195,6 +195,7 @@ void UDPServer::stop() {
|
|||
|
||||
UDPServer::UDPServer() :
|
||||
_sock(Ref<NetSocket>(NetSocket::create())) {
|
||||
memset(recv_buffer, 0, sizeof(recv_buffer));
|
||||
}
|
||||
|
||||
UDPServer::~UDPServer() {
|
||||
|
|
|
@ -46,8 +46,12 @@ class AStar : public Reference {
|
|||
|
||||
struct Point {
|
||||
Point() :
|
||||
id(0),
|
||||
enabled(false),
|
||||
neighbours(4u),
|
||||
unlinked_neighbours(4u) {}
|
||||
unlinked_neighbours(4u),
|
||||
prev_point(nullptr),
|
||||
open_pass(0) {}
|
||||
|
||||
int id;
|
||||
Vector3 pos;
|
||||
|
|
|
@ -2188,6 +2188,8 @@ void Expression::_bind_methods() {
|
|||
Expression::Expression() :
|
||||
output_type(Variant::NIL),
|
||||
sequenced(false),
|
||||
str_ofs(0),
|
||||
expression_dirty(false),
|
||||
error_set(true),
|
||||
root(nullptr),
|
||||
nodes(nullptr),
|
||||
|
|
|
@ -218,7 +218,10 @@ private:
|
|||
|
||||
Type type;
|
||||
|
||||
ENode() { next = nullptr; }
|
||||
ENode() {
|
||||
type = Type::TYPE_INPUT;
|
||||
next = nullptr;
|
||||
}
|
||||
virtual ~ENode() {
|
||||
if (next) {
|
||||
memdelete(next);
|
||||
|
@ -240,6 +243,7 @@ private:
|
|||
int index;
|
||||
InputNode() {
|
||||
type = TYPE_INPUT;
|
||||
index = 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -257,6 +261,8 @@ private:
|
|||
|
||||
OperatorNode() {
|
||||
type = TYPE_OPERATOR;
|
||||
nodes[0] = nullptr;
|
||||
nodes[1] = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -272,6 +278,8 @@ private:
|
|||
|
||||
IndexNode() {
|
||||
type = TYPE_INDEX;
|
||||
base = nullptr;
|
||||
index = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -281,6 +289,7 @@ private:
|
|||
|
||||
NamedIndexNode() {
|
||||
type = TYPE_NAMED_INDEX;
|
||||
base = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -300,6 +309,7 @@ private:
|
|||
|
||||
CallNode() {
|
||||
type = TYPE_CALL;
|
||||
base = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -322,6 +332,7 @@ private:
|
|||
Vector<ENode *> arguments;
|
||||
BuiltinFuncNode() {
|
||||
type = TYPE_BUILTIN_FUNC;
|
||||
func = BuiltinFunc::MATH_SIN;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -457,7 +457,10 @@ private:
|
|||
int reference_count;
|
||||
Connection conn;
|
||||
List<Connection>::Element *cE;
|
||||
Slot() { reference_count = 0; }
|
||||
Slot() {
|
||||
reference_count = 0;
|
||||
cE = nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
MethodInfo user;
|
||||
|
|
|
@ -422,6 +422,7 @@ bool DirAccess::exists(String p_dir) {
|
|||
|
||||
DirAccess::DirAccess() {
|
||||
_access_type = ACCESS_FILESYSTEM;
|
||||
next_is_dir = false;
|
||||
}
|
||||
|
||||
DirAccess::~DirAccess() {
|
||||
|
|
|
@ -280,6 +280,7 @@ public:
|
|||
buffer(stack_buffer),
|
||||
capacity(sizeof(stack_buffer) / sizeof(char)),
|
||||
written(0) {
|
||||
memset(stack_buffer, 0, sizeof(stack_buffer));
|
||||
}
|
||||
|
||||
_FORCE_INLINE_ void push_back(char c) {
|
||||
|
|
|
@ -396,4 +396,5 @@ int PackedDataContainerRef::size() const {
|
|||
};
|
||||
|
||||
PackedDataContainerRef::PackedDataContainerRef() {
|
||||
offset = 0;
|
||||
}
|
||||
|
|
|
@ -384,6 +384,10 @@ void ScriptDebuggerLocal::send_error(const String &p_func, const String &p_file,
|
|||
|
||||
ScriptDebuggerLocal::ScriptDebuggerLocal() {
|
||||
profiling = false;
|
||||
frame_time = 0.0f;
|
||||
idle_time = 0.0f;
|
||||
physics_time = 0.0f;
|
||||
physics_frame_time = 0.0f;
|
||||
idle_accum = OS::get_singleton()->get_ticks_usec();
|
||||
options["variable_prefix"] = "";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue