Skip to content

Commit

Permalink
Add tests for resource duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Jan 21, 2025
1 parent 5e07925 commit eda7476
Show file tree
Hide file tree
Showing 3 changed files with 491 additions and 21 deletions.
4 changes: 4 additions & 0 deletions core/variant/dictionary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,10 @@ bool Dictionary::is_typed_value() const {
return _p->typed_value.type != Variant::NIL;
}

bool Dictionary::is_same_instance(const Dictionary &p_other) const {
return _p == p_other._p;
}

bool Dictionary::is_same_typed(const Dictionary &p_other) const {
return is_same_typed_key(p_other) && is_same_typed_value(p_other);
}
Expand Down
1 change: 1 addition & 0 deletions core/variant/dictionary.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class Dictionary {
bool is_typed() const;
bool is_typed_key() const;
bool is_typed_value() const;
bool is_same_instance(const Dictionary &p_other) const;
bool is_same_typed(const Dictionary &p_other) const;
bool is_same_typed_key(const Dictionary &p_other) const;
bool is_same_typed_value(const Dictionary &p_other) const;
Expand Down
Loading

0 comments on commit eda7476

Please sign in to comment.