1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

pnUtRef started at zero refs instead of one, and this is simpler

than finding and removing all the extra Ref() calls.
This commit is contained in:
2014-04-08 20:41:50 -07:00
parent d713a13dbe
commit 23a071860e
9 changed files with 22 additions and 14 deletions

View File

@ -47,8 +47,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
class hsRefCnt {
private:
int fRefCnt;
public:
hsRefCnt() : fRefCnt(1) {}
hsRefCnt(int initRefs = 1) : fRefCnt(initRefs) {}
virtual ~hsRefCnt();
inline int RefCnt() const { return fRefCnt; }
@ -75,7 +76,7 @@ private:
std::atomic<int> fRefCnt;
public:
hsAtomicRefCnt() : fRefCnt(1) { }
hsAtomicRefCnt(int initRefs = 1) : fRefCnt(initRefs) { }
virtual ~hsAtomicRefCnt();
inline int RefCnt() const { return fRefCnt; }