diff --git a/src/xenia/base/memory.h b/src/xenia/base/memory.h index abb83bb45..52aeb8ad3 100644 --- a/src/xenia/base/memory.h +++ b/src/xenia/base/memory.h @@ -67,25 +67,21 @@ bool Protect(void* base_address, size_t length, PageAccess access, // The memory must be freed with AlignedFree. template inline T* AlignedAlloc(size_t alignment) { -#if __STDC_VERSION__ >= 201112L - return reinterpret_cast(aligned_alloc(alignment, sizeof(T))); -#elif XE_COMPILER_MSVC +#if XE_COMPILER_MSVC return reinterpret_cast(_aligned_malloc(sizeof(T), alignment)); #else -#error No aligned alloc. -#endif // __STDC_VERSION__ >= 201112L + return reinterpret_cast(aligned_alloc(alignment, sizeof(T))); +#endif // XE_COMPILER_MSVC } // Frees memory previously allocated with AlignedAlloc. template void AlignedFree(T* ptr) { -#if __STDC_VERSION__ >= 201112L - free(ptr); -#elif XE_COMPILER_MSVC +#if XE_COMPILER_MSVC _aligned_free(ptr); #else -#error No aligned alloc. -#endif // __STDC_VERSION__ >= 201112L + free(ptr); +#endif // XE_COMPILER_MSVC } typedef void* FileMappingHandle;