1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-02-20 13:54:14 +01:00

Tested Object returns (with octor/cctor/dtor/assignop)

--HG--
branch : hookman_autogen
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/branches/hookman_autogen%40550
This commit is contained in:
Pavol Marko 2007-11-09 06:19:18 +00:00
parent e9089e6730
commit 3f34d0aca9

View File

@ -133,7 +133,7 @@ namespace
} \
template <> struct MakeRet< PodRet##size > \
{ \
static PodRet##size Do(int a) NO_OPTIMIZE \
static PodRet##size Do(int a) \
{ \
PodRet##size x; \
memset(reinterpret_cast<void*>(x.actPod.x), a, size); \
@ -157,9 +157,10 @@ namespace
{ \
static ObjRet##size Do(int a) NO_OPTIMIZE \
{ \
ObjRet##size x; \
memset(reinterpret_cast<void*>(x.actObj.x), a, size); \
return x; \
ObjRet##size *x = new ObjRet##size; /* ptr: otherwise gcc optimizes away the temp obj */ \
CAutoPtrDestruction< ObjRet##size > apd(x); \
memset(reinterpret_cast<void*>(x->actObj.x), a, size); \
return *x; \
} \
};