Skip to content
Snippets Groups Projects
Commit a787defd authored by Alejandro Homs Puron's avatar Alejandro Homs Puron
Browse files

AutoObj: add AutoPtr::count() returning reference count

parent 02476694
No related branches found
No related tags found
No related merge requests found
......@@ -277,6 +277,11 @@ public:
return ptr;
}
int count() const
{
return d ? d->count() : 0;
}
private:
class AutoPtrData
......@@ -324,6 +329,11 @@ private:
return p;
}
int count() const
{
return c.count();
}
private:
T *p;
AutoCounter c;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment