mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Moving TinyStlCustomAllocator inside entry.
This commit is contained in:
parent
112b53b116
commit
122129b351
5 changed files with 15 additions and 17 deletions
|
@ -11,18 +11,4 @@
|
|||
|
||||
#include "entry/entry.h"
|
||||
|
||||
// For a custom tinystl allocator, define this and implement TinyStlCustomAllocator somewhere in the project.
|
||||
#ifndef COMMON_CONFIG_USE_TINYSTL_CUSTOM_ALLOCATOR
|
||||
# define COMMON_CONFIG_USE_TINYSTL_CUSTOM_ALLOCATOR 0
|
||||
#endif // COMMON_CONFIG_USE_TINYSTL
|
||||
|
||||
#if COMMON_CONFIG_USE_TINYSTL_CUSTOM_ALLOCATOR
|
||||
struct TinyStlCustomAllocator
|
||||
{
|
||||
static void* static_allocate(size_t _bytes);
|
||||
static void static_deallocate(void* _ptr, size_t /*_bytes*/);
|
||||
};
|
||||
# define TINYSTL_ALLOCATOR TinyStlCustomAllocator
|
||||
#endif //COMMON_CONFIG_USE_TINYSTL_CUSTOM_ALLOCATOR
|
||||
|
||||
#endif // COMMON_H_HEADER_GUARD
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
#include <bx/hash.h>
|
||||
#include <bx/tokenizecmd.h>
|
||||
|
||||
#include "../common.h"
|
||||
#include "dbg.h"
|
||||
#include "cmd.h"
|
||||
#include "entry.h" //TinyStlCustomAllocator
|
||||
|
||||
#include <tinystl/allocator.h>
|
||||
#include <tinystl/string.h>
|
||||
|
|
|
@ -18,6 +18,20 @@ extern "C" int _main_(int _argc, char** _argv);
|
|||
#define ENTRY_WINDOW_FLAG_ASPECT_RATIO UINT32_C(0x00000001)
|
||||
#define ENTRY_WINDOW_FLAG_FRAME UINT32_C(0x00000002)
|
||||
|
||||
// For a custom tinystl allocator, define this and implement TinyStlCustomAllocator somewhere in the project.
|
||||
#ifndef ENTRY_CONFIG_USE_TINYSTL_CUSTOM_ALLOCATOR
|
||||
# define ENTRY_CONFIG_USE_TINYSTL_CUSTOM_ALLOCATOR 0
|
||||
#endif // ENTRY_CONFIG_USE_TINYSTL
|
||||
|
||||
#if ENTRY_CONFIG_USE_TINYSTL_CUSTOM_ALLOCATOR
|
||||
struct TinyStlCustomAllocator
|
||||
{
|
||||
static void* static_allocate(size_t _bytes);
|
||||
static void static_deallocate(void* _ptr, size_t /*_bytes*/);
|
||||
};
|
||||
# define TINYSTL_ALLOCATOR TinyStlCustomAllocator
|
||||
#endif //ENTRY_CONFIG_USE_TINYSTL_CUSTOM_ALLOCATOR
|
||||
|
||||
namespace entry
|
||||
{
|
||||
struct WindowHandle { uint16_t idx; };
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
#include "entry_p.h"
|
||||
#include "../common.h"
|
||||
|
||||
#if ENTRY_CONFIG_USE_NATIVE && BX_PLATFORM_WINDOWS
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
#include <memory.h>
|
||||
|
||||
#include "../common.h"
|
||||
#include "entry_p.h"
|
||||
#include "input.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue