Skip to content

Commit

Permalink
Merge pull request #57159 from Pineapple/rid-set-data
Browse files Browse the repository at this point in the history
[3.x] Use refval() instead of separate ref() and get() in RID_OwnerBase::_set_data()
  • Loading branch information
akien-mga authored Jan 28, 2022
2 parents 5bd1725 + 7df2f31 commit d358268
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/rid.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ class RID_OwnerBase {
static SafeRefCount refcount;
_FORCE_INLINE_ void _set_data(RID &p_rid, RID_Data *p_data) {
p_rid._data = p_data;
refcount.ref();
p_data->_id = refcount.get();
p_data->_id = refcount.refval();
#ifndef DEBUG_ENABLED
p_data->_owner = this;
#endif
Expand Down

0 comments on commit d358268

Please sign in to comment.