From 9071077cbb2d4c986a456127a206e82e4e8ddbfd Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 27 Dec 2013 19:45:15 -0800 Subject: Protecting allocation functions further into a namespace. --- includes/Exceptions.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/includes/Exceptions.h b/includes/Exceptions.h index 799bfb6..53c4949 100644 --- a/includes/Exceptions.h +++ b/includes/Exceptions.h @@ -1,6 +1,7 @@ #pragma once #include +#include #include #include @@ -65,6 +66,8 @@ class RessourceException : public GeneralException { void ExitHelper(const String & msg, const char * fmt = NULL, ...) printfwarning(2, 3); +namespace Alloc { + static inline void * malloc(size_t size) { void * r = ::malloc(size); @@ -92,6 +95,8 @@ static inline void * realloc(void * previous, size_t size) { return r; } +}; + static inline void AssertHelperInner(const String & msg, const char * details = NULL) throw (GeneralException) { #if defined(_MSC_VER) && defined(DEBUG) __debugbreak(); -- cgit v1.2.3