mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +00:00
Refactored variant setters/getters
-Discern between named, indexed and keyed -Get direct access to functions for typed GDScript and GDNative bindings -Small changes to some classes in order to work with the new setget binder
This commit is contained in:
parent
709964849f
commit
05de7ce6ca
16 changed files with 1571 additions and 1996 deletions
|
@ -620,7 +620,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
|||
const StringName *index = &_global_names_ptr[indexname];
|
||||
|
||||
bool valid;
|
||||
dst->set_named(*index, *value, &valid);
|
||||
dst->set_named(*index, *value, valid);
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (!valid) {
|
||||
|
@ -647,10 +647,10 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
|||
bool valid;
|
||||
#ifdef DEBUG_ENABLED
|
||||
//allow better error message in cases where src and dst are the same stack position
|
||||
Variant ret = src->get_named(*index, &valid);
|
||||
Variant ret = src->get_named(*index, valid);
|
||||
|
||||
#else
|
||||
*dst = src->get_named(*index, &valid);
|
||||
*dst = src->get_named(*index, valid);
|
||||
#endif
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (!valid) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue