DRTVWR-564: Per NickyD, need not test static_cast result for nullptr.
parent
fa3a67f56b
commit
f9d810ac2a
|
|
@ -586,13 +586,6 @@ void LLEventDispatcher::add(const std::string& name, const std::string& desc,
|
|||
new LLSDDispatchEntry(desc, callable, required))));
|
||||
}
|
||||
|
||||
void LLEventDispatcher::addFail(const std::string& name, const std::string& classname) const
|
||||
{
|
||||
LL_ERRS("LLEventDispatcher") << "LLEventDispatcher(" << mDesc << ")::add(" << name
|
||||
<< "): " << classname << " is not a subclass "
|
||||
<< "of LLEventDispatcher" << LL_ENDL;
|
||||
}
|
||||
|
||||
/// Unregister a callable
|
||||
bool LLEventDispatcher::remove(const std::string& name)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -330,16 +330,8 @@ private:
|
|||
const METHOD& method, const LLSD& required)
|
||||
{
|
||||
CLASS* downcast = static_cast<CLASS*>(this);
|
||||
if (! downcast)
|
||||
{
|
||||
addFail(name, typeid(CLASS).name());
|
||||
}
|
||||
else
|
||||
{
|
||||
add(name, desc, boost::bind(method, downcast, _1), required);
|
||||
}
|
||||
add(name, desc, boost::bind(method, downcast, _1), required);
|
||||
}
|
||||
void addFail(const std::string& name, const std::string& classname) const;
|
||||
std::string try_call_log(const std::string& key, const std::string& name,
|
||||
const LLSD& event) const;
|
||||
std::string try_call(const std::string& key, const std::string& name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue