Fix 'in' operator to check if an object member exists
This commit is contained in:
parent
ad8a2b3d52
commit
0a823e85d2
1 changed files with 8 additions and 4 deletions
|
@ -1261,8 +1261,10 @@ public:
|
|||
|
||||
const String &a = *VariantGetInternalPtr<String>::get_ptr(&p_left);
|
||||
|
||||
b->get(a, &r_valid);
|
||||
*r_ret = r_valid;
|
||||
bool exist;
|
||||
b->get(a, &exist);
|
||||
*r_ret = exist;
|
||||
r_valid = true;
|
||||
}
|
||||
static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
|
||||
Object *l = right->get_validated_object();
|
||||
|
@ -1293,8 +1295,10 @@ public:
|
|||
|
||||
const StringName &a = *VariantGetInternalPtr<StringName>::get_ptr(&p_left);
|
||||
|
||||
b->get(a, &r_valid);
|
||||
*r_ret = r_valid;
|
||||
bool exist;
|
||||
b->get(a, &exist);
|
||||
*r_ret = exist;
|
||||
r_valid = true;
|
||||
}
|
||||
static inline void validated_evaluate(const Variant *left, const Variant *right, Variant *r_ret) {
|
||||
Object *l = right->get_validated_object();
|
||||
|
|
Loading…
Reference in a new issue