diff options
author | maximius <none@none> | 2009-10-17 15:35:07 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-17 15:35:07 -0700 |
commit | 26b5e033ffde3d161382fc9addbfa99738379641 (patch) | |
tree | a344f369ca32945f787a02dee35c3dbe342bed7e /src/framework/Policies/CreationPolicy.h | |
parent | f21f47005dcb6b76e1abc9f35fbcd03eed191bff (diff) |
*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget
--HG--
branch : trunk
Diffstat (limited to 'src/framework/Policies/CreationPolicy.h')
-rw-r--r-- | src/framework/Policies/CreationPolicy.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/framework/Policies/CreationPolicy.h b/src/framework/Policies/CreationPolicy.h index 91bec9eab37..9bca121b632 100644 --- a/src/framework/Policies/CreationPolicy.h +++ b/src/framework/Policies/CreationPolicy.h @@ -17,13 +17,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - #ifndef TRINITY_CREATIONPOLICY_H #define TRINITY_CREATIONPOLICY_H - #include <stdlib.h> #include "Platform/Define.h" - namespace Trinity { /** @@ -36,7 +33,6 @@ namespace Trinity static T* Create(void) { return (new T); } static void Destroy(T *obj) { delete obj; } }; - /** * LocalStaticCreation policy creates an object on the stack * the first time call Create. @@ -63,10 +59,8 @@ namespace Trinity static MaxAlign si_localStatic; return new(&si_localStatic) T; } - static void Destroy(T *obj) { obj->~T(); } }; - /** * CreateUsingMalloc by pass the memory manger. */ @@ -80,14 +74,12 @@ namespace Trinity if (!p) return 0; return new(p) T; } - static void Destroy(T* p) { p->~T(); ::free(p); } }; - /** * CreateOnCallBack creates the object base on the call back. */ @@ -99,7 +91,6 @@ namespace Trinity { return CALL_BACK::createCallBack(); } - static void Destroy(T *p) { CALL_BACK::destroyCallBack(p); |