Further fixes for GCC 4.7 build

master
Piotr Dziwinski 2015-08-14 19:33:24 +02:00
parent f9abeb21ec
commit 870f89ac4a
2 changed files with 10 additions and 5 deletions

View File

@ -42,11 +42,7 @@ public:
void Start()
{
m_thread = SDL_CreateThread([](void* data) -> int {
ThreadFunctionPtr func = *(static_cast<ThreadFunctionPtr*>(data));
func();
return 0;
}, &m_threadFunction);
m_thread = SDL_CreateThread(&StartThreadWithThreadFunction, &m_threadFunction);
}
SDL_Thread* operator*()
@ -54,6 +50,14 @@ public:
return m_thread;
}
private:
static int StartThreadWithThreadFunction(void* data)
{
ThreadFunctionPtr func = *(static_cast<ThreadFunctionPtr*>(data));
func();
return 0;
}
private:
ThreadFunctionPtr m_threadFunction;
SDL_Thread* m_thread;

View File

@ -28,6 +28,7 @@
#include "common/global.h"
#include <string>
class COldObject;