diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2023-01-24 13:41:02 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2023-07-13 12:49:39 -0400 |
commit | 25ee39dcbe7277552d8eee1ef5ad5c367f5763f9 (patch) | |
tree | 2e5b0bd233ce8e5d7cf1c3d492dd0ebdf7b915e0 /LICENSE | |
parent | d2738b60e2dfa255e504247f2b5009bc1dc24954 (diff) |
DRTVWR-558: Fix LLEventDispatcher::addMethod() for LazyEventAPI.
addMethod() was using dynamic_cast<target class*>(this) and testing for
nullptr to decide whether the class owning the passed method is, or is not, a
subclass of LLEventDispatcher. The trouble is that it doesn't work for the
deferred add() calls queued by LazyEventAPI: the dynamic_cast was always
returning nullptr. static_cast works better, but that leaves us with the
problem we were trying to solve with dynamic_cast: what if the target class
really isn't a subclass? Use std::is_base_of to pick which of two addMethod()
overloads to invoke, one of which calls addFail().
(cherry picked from commit a4d520aa5d023d80cfeec4f40c3464b54cbcfc5b)
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions