Further fixes for GCC 4.7 build
parent
f9abeb21ec
commit
870f89ac4a
|
@ -42,11 +42,7 @@ public:
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
m_thread = SDL_CreateThread([](void* data) -> int {
|
m_thread = SDL_CreateThread(&StartThreadWithThreadFunction, &m_threadFunction);
|
||||||
ThreadFunctionPtr func = *(static_cast<ThreadFunctionPtr*>(data));
|
|
||||||
func();
|
|
||||||
return 0;
|
|
||||||
}, &m_threadFunction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_Thread* operator*()
|
SDL_Thread* operator*()
|
||||||
|
@ -54,6 +50,14 @@ public:
|
||||||
return m_thread;
|
return m_thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
static int StartThreadWithThreadFunction(void* data)
|
||||||
|
{
|
||||||
|
ThreadFunctionPtr func = *(static_cast<ThreadFunctionPtr*>(data));
|
||||||
|
func();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ThreadFunctionPtr m_threadFunction;
|
ThreadFunctionPtr m_threadFunction;
|
||||||
SDL_Thread* m_thread;
|
SDL_Thread* m_thread;
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
|
|
||||||
#include "common/global.h"
|
#include "common/global.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
class COldObject;
|
class COldObject;
|
||||||
|
|
Loading…
Reference in New Issue