diff options
author | KUDr <KUDr@openttd.org> | 2007-01-11 17:29:39 +0000 |
---|---|---|
committer | KUDr <KUDr@openttd.org> | 2007-01-11 17:29:39 +0000 |
commit | 28e969924b9033f5132fe2ba223e2bcadd39a7ec (patch) | |
tree | d644a3831ca0947198b191fa3e4e8973d3a9786e /src/thread.cpp | |
parent | 5675956443d4e58713a0abd8cedb4eaaaccf22d4 (diff) | |
download | openttd-28e969924b9033f5132fe2ba223e2bcadd39a7ec.tar.xz |
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
Diffstat (limited to 'src/thread.cpp')
-rw-r--r-- | src/thread.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/thread.cpp b/src/thread.cpp index 233c4ecb6..66456d1ab 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -31,8 +31,7 @@ static void Proxy(void* arg) OTTDThread* OTTDCreateThread(OTTDThreadFunc function, void* arg) { - OTTDThread* t; - MallocT(&t, 1); + OTTDThread* t = MallocT<OTTDThread>(1); if (t == NULL) return NULL; @@ -74,8 +73,7 @@ struct OTTDThread { OTTDThread* OTTDCreateThread(OTTDThreadFunc function, void* arg) { - OTTDThread* t; - MallocT(&t, 1); + OTTDThread* t = MallocT<OTTDThread>(1); if (t == NULL) return NULL; @@ -123,8 +121,7 @@ static DWORD WINAPI Proxy(LPVOID arg) OTTDThread* OTTDCreateThread(OTTDThreadFunc function, void* arg) { - OTTDThread* t; - MallocT(&t, 1); + OTTDThread* t = MallocT<OTTDThread>(1); DWORD dwThreadId; if (t == NULL) return NULL; |