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 Dec 20, 2024
1 parent 1d5b46a commit bbfe1db
Show file tree
Hide file tree
Showing 3 changed files with 386 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 @@ -640,6 +640,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 @@ -99,6 +99,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 bbfe1db

Please sign in to comment.