diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-15 15:30:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-15 15:30:46 +0100 |
commit | 264f20f8c1b326546494b10f485ff8bc7464b253 (patch) | |
tree | 3a0fa22ce848b4ee20df2057ebb5eb5d7ea8e89b /modules/gdscript/gdscript_function.h | |
parent | 53cf289f309ef44821e5bb1fe0c81de29a82d9d3 (diff) | |
parent | 867d073b98344b848c96012418912a7e72841a31 (diff) |
Merge pull request #36189 from reduz/object-id-refactor
Changed logic and optimized ObjectID in ObjectDB and Variant, removed…
Diffstat (limited to 'modules/gdscript/gdscript_function.h')
-rw-r--r-- | modules/gdscript/gdscript_function.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index ad95ebc543..7b7bcbaac9 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -77,8 +77,8 @@ struct GDScriptDataType { return false; } - Object *obj = p_variant.operator Object *(); - if (!obj || !ObjectDB::instance_validate(obj)) { + Object *obj = p_variant.get_validated_object(); + if (!obj) { return false; } @@ -100,8 +100,8 @@ struct GDScriptDataType { return false; } - Object *obj = p_variant.operator Object *(); - if (!obj || !ObjectDB::instance_validate(obj)) { + Object *obj = p_variant.get_validated_object(); + if (!obj) { return false; } |