removed last vestiges of llinstancetracerscopedguard
parent
fd9f3b9fe9
commit
df82fbffa2
|
|
@ -235,27 +235,6 @@ public:
|
|||
static instance_iter beginInstances() { return instance_iter(getSet_().begin()); }
|
||||
static instance_iter endInstances() { return instance_iter(getSet_().end()); }
|
||||
|
||||
// DEPRECATED: iterators now increment and decrement iteration depth
|
||||
// Instantiate this to get access to iterators for this type. It's a 'guard' in the sense
|
||||
// that it treats deletes of this type as errors as long as there is an instance of
|
||||
// this class alive in scope somewhere (i.e. deleting while iterating is bad).
|
||||
class LLInstanceTrackerScopedGuard
|
||||
{
|
||||
public:
|
||||
LLInstanceTrackerScopedGuard()
|
||||
{
|
||||
++sIterationNestDepth;
|
||||
}
|
||||
|
||||
~LLInstanceTrackerScopedGuard()
|
||||
{
|
||||
--sIterationNestDepth;
|
||||
}
|
||||
|
||||
static instance_iter beginInstances() { return instance_iter(getSet_().begin()); }
|
||||
static instance_iter endInstances() { return instance_iter(getSet_().end()); }
|
||||
};
|
||||
|
||||
protected:
|
||||
LLInstanceTracker()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -156,8 +156,7 @@ namespace tut
|
|||
keys.insert(&two);
|
||||
keys.insert(&three);
|
||||
{
|
||||
Unkeyed::LLInstanceTrackerScopedGuard guard;
|
||||
for (Unkeyed::key_iter ki(guard.beginKeys()), kend(guard.endKeys());
|
||||
for (Unkeyed::key_iter ki(beginKeys()), kend(endKeys());
|
||||
ki != kend; ++ki)
|
||||
{
|
||||
ensure_equals("spurious key", keys.erase(*ki), 1);
|
||||
|
|
@ -170,9 +169,7 @@ namespace tut
|
|||
instances.insert(&two);
|
||||
instances.insert(&three);
|
||||
{
|
||||
Unkeyed::LLInstanceTrackerScopedGuard guard;
|
||||
for (Unkeyed::instance_iter ii(guard.beginInstances()), iend(guard.endInstances());
|
||||
ii != iend; ++ii)
|
||||
for (Unkeyed::instance_iter ii(beginInstances()), iend(endInstances()); ii != iend; ++ii)
|
||||
{
|
||||
Unkeyed& ref = *ii;
|
||||
ensure_equals("spurious instance", instances.erase(&ref), 1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue