use Callback::Assign
parent
9e269500d2
commit
0bd8f12c64
|
@ -74,14 +74,8 @@ CallbackTraceSource<T1,T2,T3,T4>::AddCallback (CallbackBase const & callback,
|
||||||
TraceContext const &context)
|
TraceContext const &context)
|
||||||
{
|
{
|
||||||
Callback<void,TraceContext const &,T1,T2,T3,T4> cb;
|
Callback<void,TraceContext const &,T1,T2,T3,T4> cb;
|
||||||
if (!cb.CheckType (callback))
|
cb.Assign (callback);
|
||||||
{
|
|
||||||
NS_FATAL_ERROR ("Incompatible callbacks. (feed to \"c++filt -t\"): got=\"" <<
|
|
||||||
typeid (callback).name () << "\" expected=\"" <<
|
|
||||||
typeid (cb).name () << "\"");
|
|
||||||
}
|
|
||||||
m_context.Add (context);
|
m_context.Add (context);
|
||||||
cb = *static_cast<Callback<void,TraceContext const &,T1,T2,T3,T4> const *> (&callback);
|
|
||||||
m_callbackList.push_back (cb);
|
m_callbackList.push_back (cb);
|
||||||
}
|
}
|
||||||
template<typename T1, typename T2,
|
template<typename T1, typename T2,
|
||||||
|
|
Loading…
Reference in New Issue