Fix uninitialized integers
This commit is contained in:
parent
9abfe4ce95
commit
68a9492f3d
|
@ -18,7 +18,7 @@ class BTInstance : public RefCounted {
|
|||
|
||||
private:
|
||||
Ref<BTTask> root_task;
|
||||
uint64_t owner_node_id;
|
||||
uint64_t owner_node_id = 0;
|
||||
String source_bt_path;
|
||||
BT::Status last_status = BT::FRESH;
|
||||
|
||||
|
@ -39,7 +39,7 @@ protected:
|
|||
|
||||
public:
|
||||
_FORCE_INLINE_ Ref<BTTask> get_root_task() const { return root_task; }
|
||||
_FORCE_INLINE_ Node *get_owner_node() const { return Object::cast_to<Node>(OBJECT_DB_GET_INSTANCE(owner_node_id)); }
|
||||
_FORCE_INLINE_ Node *get_owner_node() const { return owner_node_id ? Object::cast_to<Node>(OBJECT_DB_GET_INSTANCE(owner_node_id)) : nullptr; }
|
||||
_FORCE_INLINE_ BT::Status get_last_status() const { return last_status; }
|
||||
_FORCE_INLINE_ bool is_instance_valid() const { return root_task.is_valid(); }
|
||||
_FORCE_INLINE_ String get_source_bt_path() const { return source_bt_path; }
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
};
|
||||
|
||||
List<TaskData> tasks;
|
||||
uint64_t bt_instance_id;
|
||||
uint64_t bt_instance_id = 0;
|
||||
NodePath node_owner_path;
|
||||
String source_bt_path;
|
||||
|
||||
|
|
|
@ -132,6 +132,7 @@ bool LimboDebugger::is_active() const {
|
|||
}
|
||||
|
||||
void LimboDebugger::_track_tree(uint64_t p_instance_id) {
|
||||
ERR_FAIL_COND(p_instance_id == 0);
|
||||
ERR_FAIL_COND(!active_bt_instances.has(p_instance_id));
|
||||
|
||||
_untrack_tree();
|
||||
|
|
|
@ -49,7 +49,7 @@ protected:
|
|||
#ifdef DEBUG_ENABLED
|
||||
private:
|
||||
HashSet<uint64_t> active_bt_instances;
|
||||
uint64_t tracked_instance_id;
|
||||
uint64_t tracked_instance_id = 0;
|
||||
bool session_active = false;
|
||||
|
||||
void _track_tree(uint64_t p_instance_id);
|
||||
|
|
|
@ -52,7 +52,7 @@ class LimboDebuggerTab : public PanelContainer {
|
|||
|
||||
private:
|
||||
struct BTInstanceInfo {
|
||||
uint64_t instance_id;
|
||||
uint64_t instance_id = 0;
|
||||
String owner_node_path;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue