Skip to content

Commit fd0cb36

Browse files
authored
[CORE] Fix copying of RefCountClass, RefCountValue (#1081)
1 parent 37b73d7 commit fd0cb36

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Core/Libraries/Source/WWVegas/WWLib/refcount.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ class RefCountClass
123123
#endif
124124
}
125125

126+
/*
127+
** The reference counter value cannot be copied.
128+
*/
126129
RefCountClass(const RefCountClass & ) :
127130
NumRefs(1)
128131
#ifndef NDEBUG
@@ -135,6 +138,8 @@ class RefCountClass
135138
#endif
136139
}
137140

141+
RefCountClass& operator=(const RefCountClass&) { return *this; }
142+
138143
/*
139144
** Add_Ref, call this function if you are going to keep a pointer
140145
** to this object.
@@ -280,6 +285,12 @@ class RefCountValue
280285
WWASSERT(NumRefs == IntegerType(0));
281286
}
282287

288+
/*
289+
** The reference counter value cannot be copied.
290+
*/
291+
RefCountValue(const RefCountValue&) : NumRefs(1) {}
292+
RefCountValue& operator=(const RefCountValue&) { return *this; }
293+
283294
/*
284295
** Add_Ref, call this function if you are going to keep a pointer to this object.
285296
*/

0 commit comments

Comments
 (0)