Add recursive comparison to Array and Dictionary
...and expose it to GDScript. Co-authored-by: Emmanuel Leblond <emmanuel.leblond@gmail.com>
This commit is contained in:
@ -213,8 +213,12 @@ public:
|
||||
(*list_element)->get().second = p_value;
|
||||
return Element(*list_element);
|
||||
}
|
||||
typename InternalList::Element *new_element = list.push_back(Pair<const K *, V>(NULL, p_value));
|
||||
// Incorrectly set the first value of the pair with a value that will
|
||||
// be invalid as soon as we leave this function...
|
||||
typename InternalList::Element *new_element = list.push_back(Pair<const K *, V>(&p_key, p_value));
|
||||
// ...this is needed here in case the hashmap recursively reference itself...
|
||||
typename InternalMap::Element *e = map.set(p_key, new_element);
|
||||
// ...now we can set the right value !
|
||||
new_element->get().first = &e->key();
|
||||
|
||||
return Element(new_element);
|
||||
|
||||
Reference in New Issue
Block a user