Skip to content
Snippets Groups Projects
Commit 286342f7 authored by Nat Goodspeed's avatar Nat Goodspeed
Browse files

STORM-1541: Change llassert() to llassert_always(): unit tests expect.

Now that we have unit tests that require assertion failure if you try to
delete an LLInstanceTracker subclass instance with an iterator loose, having
llassert() "sometimes" compile away (whimsically, depending on platform as
well as build type!) makes those tests fail. Use llassert_always() instead.
parent b4a1d339
No related branches found
No related tags found
No related merge requests found
...@@ -197,7 +197,7 @@ class LLInstanceTracker : public LLInstanceTrackerBase ...@@ -197,7 +197,7 @@ class LLInstanceTracker : public LLInstanceTrackerBase
virtual ~LLInstanceTracker() virtual ~LLInstanceTracker()
{ {
// it's unsafe to delete instances of this type while all instances are being iterated over. // it's unsafe to delete instances of this type while all instances are being iterated over.
llassert(getStatic().sIterationNestDepth == 0); llassert_always(getStatic().sIterationNestDepth == 0);
remove_(); remove_();
} }
virtual void setKey(KEY key) { remove_(); add_(key); } virtual void setKey(KEY key) { remove_(); add_(key); }
...@@ -287,7 +287,7 @@ class LLInstanceTracker<T, T*> : public LLInstanceTrackerBase ...@@ -287,7 +287,7 @@ class LLInstanceTracker<T, T*> : public LLInstanceTrackerBase
virtual ~LLInstanceTracker() virtual ~LLInstanceTracker()
{ {
// it's unsafe to delete instances of this type while all instances are being iterated over. // it's unsafe to delete instances of this type while all instances are being iterated over.
llassert(getStatic().sIterationNestDepth == 0); llassert_always(getStatic().sIterationNestDepth == 0);
getSet_().erase(static_cast<T*>(this)); getSet_().erase(static_cast<T*>(this));
} }
......
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