Skip to content

Commit 8c5e56a

Browse files
committed
- mac fix
1 parent e8766b0 commit 8c5e56a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SPlisHSPlasH/Utilities/AVX_math.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2037,7 +2037,7 @@ class AlignmentAllocator {
20372037
inline pointer allocate(size_type n) {
20382038
#ifdef _WIN32
20392039
return (pointer)_aligned_malloc(n * sizeof(value_type), N);
2040-
#elif __linux__
2040+
#elif defined(__linux__) || defined(__APPLE__)
20412041
// NB! Argument order is opposite from MSVC/Windows
20422042
return (pointer) aligned_alloc(N, n * sizeof(value_type));
20432043
#else
@@ -2048,7 +2048,7 @@ class AlignmentAllocator {
20482048
inline void deallocate(pointer p, size_type) {
20492049
#ifdef _WIN32
20502050
_aligned_free(p);
2051-
#elif __linux__
2051+
#elif defined(__linux__) || defined(__APPLE__)
20522052
free(p);
20532053
#else
20542054
#error "Unknown platform"

0 commit comments

Comments
 (0)