You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
|
||||
Variant FuncRef::call_func(const Variant **p_args, int p_argcount, Variant::CallError &r_error) {
|
||||
|
||||
if (id == 0) {
|
||||
if (id.is_null()) {
|
||||
r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL;
|
||||
return Variant();
|
||||
}
|
||||
@@ -48,7 +48,7 @@ Variant FuncRef::call_func(const Variant **p_args, int p_argcount, Variant::Call
|
||||
|
||||
Variant FuncRef::call_funcv(const Array &p_args) {
|
||||
|
||||
ERR_FAIL_COND_V(id == 0, Variant());
|
||||
ERR_FAIL_COND_V(id.is_null(), Variant());
|
||||
|
||||
Object *obj = ObjectDB::get_instance(id);
|
||||
|
||||
@@ -69,7 +69,7 @@ void FuncRef::set_function(const StringName &p_func) {
|
||||
}
|
||||
|
||||
bool FuncRef::is_valid() const {
|
||||
if (id == 0)
|
||||
if (id.is_null())
|
||||
return false;
|
||||
|
||||
Object *obj = ObjectDB::get_instance(id);
|
||||
@@ -95,6 +95,5 @@ void FuncRef::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("is_valid"), &FuncRef::is_valid);
|
||||
}
|
||||
|
||||
FuncRef::FuncRef() :
|
||||
id(0) {
|
||||
FuncRef::FuncRef() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user