summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2022-06-21 17:24:03 -0400
committerNat Goodspeed <nat@lindenlab.com>2022-06-21 17:24:03 -0400
commitf9d810ac2a02ef96c843e214c7479146dd4f4157 (patch)
tree3a21be87da3730095714bd10a4d77e52e0c3a557 /indra/llcommon
parentfa3a67f56b15d81bfd22f744314a7d9aa35bf90e (diff)
DRTVWR-564: Per NickyD, need not test static_cast result for nullptr.
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/lleventdispatcher.cpp7
-rw-r--r--indra/llcommon/lleventdispatcher.h10
2 files changed, 1 insertions, 16 deletions
diff --git a/indra/llcommon/lleventdispatcher.cpp b/indra/llcommon/lleventdispatcher.cpp
index bc53ec3da0..7ba8c5ada7 100644
--- a/indra/llcommon/lleventdispatcher.cpp
+++ b/indra/llcommon/lleventdispatcher.cpp
@@ -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)
{
diff --git a/indra/llcommon/lleventdispatcher.h b/indra/llcommon/lleventdispatcher.h
index 2e140329f3..6d1df86fea 100644
--- a/indra/llcommon/lleventdispatcher.h
+++ b/indra/llcommon/lleventdispatcher.h
@@ -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,