You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #44275 from vnen/variant-function-arg-pointers
Use pointer parameters in Variant function pointers
This commit is contained in:
@@ -739,7 +739,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||
const Variant::ValidatedKeyedSetter setter = _keyed_setters_ptr[index_setter];
|
||||
|
||||
bool valid;
|
||||
setter(dst, index, value, valid);
|
||||
setter(dst, index, value, &valid);
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (!valid) {
|
||||
@@ -771,7 +771,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||
int64_t int_index = *VariantInternal::get_int(index);
|
||||
|
||||
bool oob;
|
||||
setter(dst, int_index, value, oob);
|
||||
setter(dst, int_index, value, &oob);
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (oob) {
|
||||
@@ -836,9 +836,9 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||
#ifdef DEBUG_ENABLED
|
||||
// Allow better error message in cases where src and dst are the same stack position.
|
||||
Variant ret;
|
||||
getter(src, key, &ret, valid);
|
||||
getter(src, key, &ret, &valid);
|
||||
#else
|
||||
getter(src, key, dst, valid);
|
||||
getter(src, key, dst, &valid);
|
||||
#endif
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (!valid) {
|
||||
@@ -871,7 +871,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||
int64_t int_index = *VariantInternal::get_int(index);
|
||||
|
||||
bool oob;
|
||||
getter(src, int_index, dst, oob);
|
||||
getter(src, int_index, dst, &oob);
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (oob) {
|
||||
@@ -1293,7 +1293,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
||||
|
||||
GET_INSTRUCTION_ARG(dst, argc);
|
||||
|
||||
constructor(*dst, (const Variant **)argptrs);
|
||||
constructor(dst, (const Variant **)argptrs);
|
||||
|
||||
ip += 3;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user