summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-08-30 14:08:32 -0400
committerNat Goodspeed <nat@lindenlab.com>2016-08-30 14:08:32 -0400
commiteddce74206328f213d83c9a76432645a7d3dbc22 (patch)
treeca65aab7615661307e91b9dd973855d49a431c04 /indra/llcommon
parentc92eb7e59198d37698c70b5e3be50503f5174cf3 (diff)
MAINT-5232: Do less work inside typeid() calls.
clang gets nervous about expressions that call functions inside typeid(), even though these particular typeid() calls are runtime expressions on runtime values. Extract the offending calls to a previous statement.
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llsingleton.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp
index b78110296f..8c8ded0e51 100644
--- a/indra/llcommon/llsingleton.cpp
+++ b/indra/llcommon/llsingleton.cpp
@@ -115,9 +115,10 @@ void LLSingletonBase::pop_initializing()
}
if (list.back() != this)
{
+ LLSingletonBase* back(list.back());
logerrs("Push/pop mismatch in stack of currently-initializing LLSingletons: ",
demangle(typeid(*this).name()).c_str(), "::getInstance() trying to pop ",
- demangle(typeid(*list.back()).name()).c_str());
+ demangle(typeid(*back).name()).c_str());
}
// Here we're sure that list.back() == this. Whew, pop it.
list.pop_back();
@@ -148,7 +149,8 @@ void LLSingletonBase::capture_dependency(EInitState initState)
{
// 'found' is an iterator; *found is an LLSingletonBase*; **found
// is the actual LLSingletonBase instance.
- out << demangle(typeid(**found).name()) << " -> ";
+ LLSingletonBase* foundp(*found);
+ out << demangle(typeid(*foundp).name()) << " -> ";
}
// We promise to capture dependencies from both the constructor
// and the initSingleton() method, so an LLSingleton's instance