瀏覽代碼

Merge pull request #57159 from Pineapple/rid-set-data

[3.x] Use refval() instead of separate ref() and get() in RID_OwnerBase::_set_data()
Rémi Verschelde 3 年之前
父節點
當前提交
d3582685d2
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      core/rid.h

+ 1 - 2
core/rid.h

@@ -93,8 +93,7 @@ protected:
 	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