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