[ox/std] Fix ox_malloca to work outside ox namespace

This commit is contained in:
Gary Talent 2019-01-15 17:39:33 -06:00
parent 59ee1ada56
commit ec6326001d

View File

@ -30,7 +30,7 @@ void *operator new(std::size_t, void*) noexcept;
* @return an ox::MallocaPtr of the given type pointing to the requested size memory allocation * @return an ox::MallocaPtr of the given type pointing to the requested size memory allocation
*/ */
#if defined(OX_USE_STDLIB) #if defined(OX_USE_STDLIB)
#define ox_malloca(size, Type, ...) ox::MallocaPtr<Type>(size > MallocaStackLimit, new (size > MallocaStackLimit ? new uint8_t[size] : ox_alloca(size)) Type(__VA_ARGS__)) #define ox_malloca(size, Type, ...) ox::MallocaPtr<Type>(size > ox::MallocaStackLimit, new (size > ox::MallocaStackLimit ? new uint8_t[size] : ox_alloca(size)) Type(__VA_ARGS__))
#else #else
#define ox_malloca(size, Type, ...) ox::MallocaPtr<Type>(false, new (ox_alloca(size)) Type(__VA_ARGS__)) #define ox_malloca(size, Type, ...) ox::MallocaPtr<Type>(false, new (ox_alloca(size)) Type(__VA_ARGS__))
#endif #endif