Fix Cycles build error after recent changes

We need to do aligned alloc of the services instead of globals now since the
concurrent map moved there.
This commit is contained in:
2019-05-14 15:05:24 +02:00
parent 0dd5281ab2
commit b63ffa8919
3 changed files with 11 additions and 15 deletions

View File

@@ -31,10 +31,10 @@ void *util_aligned_malloc(size_t size, int alignment);
void util_aligned_free(void *ptr);
/* Aligned new operator. */
template<typename T> T *util_aligned_new()
template<typename T, typename... Args> T *util_aligned_new(Args... args)
{
void *mem = util_aligned_malloc(sizeof(T), alignof(T));
return new (mem) T();
return new (mem) T(args...);
}
template<typename T> void util_aligned_delete(T *t)