[ox/std] Fix ox_malloca to work outside ox namespace
This commit is contained in:
parent
59ee1ada56
commit
ec6326001d
2
deps/ox/src/ox/std/new.hpp
vendored
2
deps/ox/src/ox/std/new.hpp
vendored
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user