DRTVWR-558: Generalize LLEventDispatcher::add() constraints.
Instead of checking whether an add() parameter is exactly LLSD or LLSDMap, check whether it's convertible to LLSD -- which handles those cases and more. (cherry picked from commit fa168c11f64771dadc5df86d14ca2f07eba3b8ba) (cherry picked from commit 6b5bfc1cf674fc568d86d7ed623fd7bb3ee2f646)meow-7.2.2
parent
1ef06b04a3
commit
b6bbd86e5e
|
|
@ -216,8 +216,7 @@ public:
|
|||
template<typename Method, typename InstanceGetter>
|
||||
typename std::enable_if<
|
||||
boost::function_types::is_member_function_pointer<Method>::value &&
|
||||
! std::is_same<InstanceGetter, LLSD>::value &&
|
||||
! std::is_same<InstanceGetter, LLSDMap>::value
|
||||
! std::is_convertible<InstanceGetter, LLSD>::value
|
||||
>::type add(const std::string& name,
|
||||
const std::string& desc,
|
||||
Method f,
|
||||
|
|
@ -306,8 +305,7 @@ public:
|
|||
template<typename Method, typename InstanceGetter>
|
||||
typename std::enable_if<
|
||||
boost::function_types::is_member_function_pointer<Method>::value &&
|
||||
! std::is_same<InstanceGetter, LLSD>::value &&
|
||||
! std::is_same<InstanceGetter, LLSDMap>::value
|
||||
! std::is_convertible<InstanceGetter, LLSD>::value
|
||||
>::type add(const std::string& name,
|
||||
const std::string& desc,
|
||||
Method f,
|
||||
|
|
@ -561,8 +559,7 @@ void LLEventDispatcher::add(const std::string& name, const std::string& desc, Me
|
|||
template<typename Method, typename InstanceGetter>
|
||||
typename std::enable_if<
|
||||
boost::function_types::is_member_function_pointer<Method>::value &&
|
||||
! std::is_same<InstanceGetter, LLSD>::value &&
|
||||
! std::is_same<InstanceGetter, LLSDMap>::value
|
||||
! std::is_convertible<InstanceGetter, LLSD>::value
|
||||
>::type
|
||||
LLEventDispatcher::add(const std::string& name, const std::string& desc, Method f,
|
||||
const InstanceGetter& getter)
|
||||
|
|
@ -608,8 +605,7 @@ void LLEventDispatcher::add(const std::string& name, const std::string& desc, Me
|
|||
template<typename Method, typename InstanceGetter>
|
||||
typename std::enable_if<
|
||||
boost::function_types::is_member_function_pointer<Method>::value &&
|
||||
! std::is_same<InstanceGetter, LLSD>::value &&
|
||||
! std::is_same<InstanceGetter, LLSDMap>::value
|
||||
! std::is_convertible<InstanceGetter, LLSD>::value
|
||||
>::type
|
||||
LLEventDispatcher::add(const std::string& name, const std::string& desc, Method f,
|
||||
const InstanceGetter& getter,
|
||||
|
|
|
|||
Loading…
Reference in New Issue