improve compat with shared_ptr in view of future riddance of local code
This commit is contained in:
parent
44c4b5c82d
commit
4080b4855d
@ -41,16 +41,21 @@ public:
|
||||
rep = 0;
|
||||
pcount = 0;
|
||||
}
|
||||
void reset() {
|
||||
release();
|
||||
}
|
||||
~RefCntr()
|
||||
{
|
||||
release();
|
||||
}
|
||||
X *operator->() {return rep;}
|
||||
X *getptr() const {return rep;}
|
||||
X *get() const {return rep;}
|
||||
const X *getconstptr() const {return rep;}
|
||||
int getcnt() const {return pcount ? *pcount : 0;}
|
||||
bool isNull() const {return rep == 0;}
|
||||
bool isNotNull() const {return rep != 0;}
|
||||
operator bool() const {return rep != 0;}
|
||||
};
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user