Commits

Kaya Kupferschmidt  committed 2c9b719

Fixed atomic unittest

  • Participants
  • Parent commits 9c35dfe

Comments (0)

Files changed (1)

File source/unittest/object/Test_Atomic.h

 class atomic_functor
 {
 public:
-    atomic_functor(void* data)
-        : atom(*static_cast<T*>(data))
+    atomic_functor(T* data)
+        : atom(*data)
     {
     }
     bool operator()() {
     Array<Reference<Thread> > threads;
     for (int i = 0; i < numThreads; i++)
     {
-        Reference<Thread> thread = new Thread(atomic_functor<T,F>(&atom));
+        Reference<Thread> thread = new Thread(atomic_functor<T,F>(atom));
         thread->start();
         threads.insert(thread);
     }