diff --git a/src/simulator/timer.cc b/src/simulator/timer.cc index 24f6a9207..489847c3b 100644 --- a/src/simulator/timer.cc +++ b/src/simulator/timer.cc @@ -231,8 +231,11 @@ TimerTests::RunTests (void) timer.Schedule (); timer.SetFunction (&TimerTests::bazi, this, 1); + timer.SetArguments (3); timer.SetFunction (&TimerTests::bazir, this, 1); + timer.SetArguments (3); timer.SetFunction (&TimerTests::bazcir, this, 1); + timer.SetArguments (3); Simulator::Run (); Simulator::Destroy (); diff --git a/src/simulator/timer.h b/src/simulator/timer.h index dbd790051..ebd38a306 100644 --- a/src/simulator/timer.h +++ b/src/simulator/timer.h @@ -347,9 +347,9 @@ template ::ParameterType> { - MemFnTimerImplZero (MEM_PTR memPtr, OBJ_PTR objPtr) + MemFnTimerImplOne (MEM_PTR memPtr, OBJ_PTR objPtr) : m_memPtr (memPtr), m_objPtr (objPtr) {} virtual void SetArguments (typename TimerTraits::ParameterType a1) { m_a1 = a1; @@ -360,7 +360,7 @@ Timer::SetFunction (MEM_PTR memPtr, OBJ_PTR objPtr, T1 a1) MEM_PTR m_memPtr; OBJ_PTR m_objPtr; typename TimerTraits::StoredType m_a1; - } *function = new MemFnTimerImplZero (memPtr, objPtr); + } *function = new MemFnTimerImplOne (memPtr, objPtr); function->SetArguments (a1); delete m_impl; m_impl = function;