diff --git a/source/gs-vertex.cpp b/source/gs-vertex.cpp index 4b94ea0a..2e423b7d 100644 --- a/source/gs-vertex.cpp +++ b/source/gs-vertex.cpp @@ -19,6 +19,7 @@ #include "gs-vertexbuffer.h" #include "util-memory.h" +#include GS::Vertex& GS::Vertex::operator=(const Vertex& r) { vec3_copy(&this->position, &r.position); @@ -41,7 +42,7 @@ GS::Vertex* GS::Vertex::operator=(const Vertex* r) { } void* GS::Vertex::operator new(size_t count) { - return util::malloc_aligned(16, count); + return _aligned_malloc(count, 16); } void* GS::Vertex::operator new(size_t count, void* d){ @@ -49,7 +50,7 @@ void* GS::Vertex::operator new(size_t count, void* d){ } void* GS::Vertex::operator new[](size_t count) { - return util::malloc_aligned(16, count); + return _aligned_malloc(count, 16); } void* GS::Vertex::operator new[](size_t count, void* d) { @@ -57,9 +58,9 @@ void* GS::Vertex::operator new[](size_t count, void* d) { } void GS::Vertex::operator delete(void* p) { - return util::free_aligned(p); + return _aligned_free(p); } void GS::Vertex::operator delete[](void* p) { - return util::free_aligned(p); + return _aligned_free(p); } diff --git a/source/util-math.cpp b/source/util-math.cpp index 8a420274..836e3391 100644 --- a/source/util-math.cpp +++ b/source/util-math.cpp @@ -19,35 +19,36 @@ #include "util-math.h" #include "util-memory.h" +#include void* util::vec3a::operator new(size_t count){ - return malloc_aligned(16, count); + return _aligned_malloc(count, 16); } void* util::vec3a::operator new[](size_t count) { - return malloc_aligned(16, count); + return _aligned_malloc(count, 16); } void util::vec3a::operator delete(void* p) { - free_aligned(p); + _aligned_free(p); } void util::vec3a::operator delete[](void* p) { - free_aligned(p); + _aligned_free(p); } -void* util::vec4a::operator new(size_t count) { - return malloc_aligned(16, count); +void* util::vec4a::operator new(size_t count){ + return _aligned_malloc(count, 16); } void* util::vec4a::operator new[](size_t count) { - return malloc_aligned(16, count); + return _aligned_malloc(count, 16); } void util::vec4a::operator delete(void* p) { - free_aligned(p); + _aligned_free(p); } void util::vec4a::operator delete[](void* p) { - free_aligned(p); + _aligned_free(p); }