From 804a460d75e5e84c79c3303b7235d91f5ba5bb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Thu, 12 Feb 2015 21:52:34 -0800 Subject: [PATCH] Added ability to configure entry allocator. --- examples/common/entry/entry.cpp | 2 +- examples/common/entry/entry_p.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/common/entry/entry.cpp b/examples/common/entry/entry.cpp index 232d610f..60cfbbe5 100644 --- a/examples/common/entry/entry.cpp +++ b/examples/common/entry/entry.cpp @@ -22,7 +22,7 @@ namespace entry static bool s_exit = false; static bx::FileReaderI* s_fileReader = NULL; static bx::FileWriterI* s_fileWriter = NULL; - static bx::CrtAllocator s_allocator; + static ENTRY_CONFIG_ALLOCATOR s_allocator; bool setOrToggle(uint32_t& _flags, const char* _name, uint32_t _bit, int _first, int _argc, char const* const* _argv) { diff --git a/examples/common/entry/entry_p.h b/examples/common/entry/entry_p.h index 379e250f..7a8652dc 100644 --- a/examples/common/entry/entry_p.h +++ b/examples/common/entry/entry_p.h @@ -39,6 +39,10 @@ # error "Both ENTRY_DEFAULT_WIDTH and ENTRY_DEFAULT_HEIGHT must be defined." #endif // ENTRY_DEFAULT_WIDTH +#ifndef ENTRY_CONFIG_ALLOCATOR +# define ENTRY_CONFIG_ALLOCATOR bx::CrtAllocator +#endif // ENTRY_CONFIG_ALLOCATOR + #define ENTRY_IMPLEMENT_EVENT(_class, _type) \ _class(WindowHandle _handle) : Event(_type, _handle) {}