[*] Config sewage
This commit is contained in:
parent
947356120b
commit
526444882b
@ -15,7 +15,16 @@
|
|||||||
#define AUROXTL_COMMODITY_CATCH while (0)
|
#define AUROXTL_COMMODITY_CATCH while (0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if (!defined(AURORA_ENGINE_KERNEL) && \
|
||||||
|
!defined(_AUHAS_AURORARUNTIME))
|
||||||
|
#define AURORA_ROXTL_ALLOCATORS_USE_STD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(AURORA_ROXTL_ALLOCATORS_USE_STD)
|
||||||
|
#define AURORA_ROXTL_CONTAINERS_USE_PURE
|
||||||
|
#endif
|
||||||
|
|
||||||
// Crossing API boundaries will resort in an alloc + copy
|
// Crossing API boundaries will resort in an alloc + copy
|
||||||
// Don't enable unless you're in the ecosystem
|
// Don't enable unless you're in the ecosystem
|
||||||
// Default behaviour (omitted): use the exact std::string type
|
// Default behaviour (omitted): use the exact std::string type
|
||||||
//#define AURORA_ROXTL_STRING_USE_STR_ALLOCATOR
|
|
@ -13,17 +13,15 @@
|
|||||||
|
|
||||||
#include "auMemoryModel.hpp"
|
#include "auMemoryModel.hpp"
|
||||||
|
|
||||||
#if defined(_CPPSHARP) || defined(_AURORA_NO_SPECIAL_ARRAY_OPTIMIAZATION) || (!defined(_AUHAS_AURORARUNTIME) && !defined(AURORA_ENGINE_KERNEL))
|
#if defined(AURORA_ROXTL_CONTAINERS_USE_PURE)
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
using AuList = AURORA_RUNTIME_AU_LIST<T>;
|
using AuList = AURORA_RUNTIME_AU_LIST<T>;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
template <class T>
|
||||||
|
using AuList = AURORA_RUNTIME_AU_LIST<T,
|
||||||
template <class T>
|
|
||||||
using AuList = AURORA_RUNTIME_AU_LIST<T,
|
|
||||||
AuConditional_t<AuIsClass_v<T>,
|
AuConditional_t<AuIsClass_v<T>,
|
||||||
Aurora::Memory::ClassArrayAllocator<T>,
|
Aurora::Memory::ClassArrayAllocator<T>,
|
||||||
Aurora::Memory::PrimitiveArrayAllocator<T>
|
Aurora::Memory::PrimitiveArrayAllocator<T>
|
||||||
|
@ -156,6 +156,18 @@ static void auline AuSafeDelete(T *in)
|
|||||||
|
|
||||||
namespace Aurora::Memory
|
namespace Aurora::Memory
|
||||||
{
|
{
|
||||||
|
#if defined(AURORA_ROXTL_ALLOCATORS_USE_STD)
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
using PrimitiveArrayAllocator = std::allocator<T>;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
using ClassArrayAllocator = std::allocator<T>;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
using StringAllocator = std::allocator<T>;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
static void *__FAlloc(Types::size_t length, Types::size_t align);
|
static void *__FAlloc(Types::size_t length, Types::size_t align);
|
||||||
static void __Free(void *buffer);
|
static void __Free(void *buffer);
|
||||||
@ -195,6 +207,7 @@ namespace Aurora::Memory
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
using PrimitiveArrayAllocator = BaseAuroraRuntimeAllocator<T>;
|
using PrimitiveArrayAllocator = BaseAuroraRuntimeAllocator<T>;
|
||||||
|
|
||||||
@ -204,4 +217,5 @@ namespace Aurora::Memory
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
using StringAllocator = BaseAuroraRuntimeAllocator<T>;
|
using StringAllocator = BaseAuroraRuntimeAllocator<T>;
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
@ -10,7 +10,9 @@
|
|||||||
//#include "tinyutf8.h"
|
//#include "tinyutf8.h"
|
||||||
//#define AU_STRING_IS_TINYUTF_EXPERIMENT
|
//#define AU_STRING_IS_TINYUTF_EXPERIMENT
|
||||||
|
|
||||||
#if defined(AURORA_ROXTL_STRING_USE_STR_ALLOCATOR)
|
#if defined(AURORA_ROXTL_CONTAINERS_USE_PURE)
|
||||||
|
using AuString = std::string;
|
||||||
|
#elif defined(AURORA_ROXTL_STRING_USE_STR_ALLOCATOR)
|
||||||
template <class Base_t = std::basic_string<char, std::char_traits<char>, Aurora::Memory::StringAllocator<char>>>
|
template <class Base_t = std::basic_string<char, std::char_traits<char>, Aurora::Memory::StringAllocator<char>>>
|
||||||
struct _AuStdExString : Base_t
|
struct _AuStdExString : Base_t
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user