use Callback::Assign

Mathieu Lacage 2007-05-07 13:44:33 +02:00
parent 9e269500d2
commit 0bd8f12c64
1 changed files with 1 additions and 7 deletions

View File

@ -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,