diff --git a/source/gfx/gfx-source-texture.cpp b/source/gfx/gfx-source-texture.cpp index 2cf776b8..b138e9aa 100644 --- a/source/gfx/gfx-source-texture.cpp +++ b/source/gfx/gfx-source-texture.cpp @@ -27,12 +27,12 @@ gfx::source_texture::~source_texture() _child.reset(); } -gfx::source_texture::source_texture(obs_source_t* _parent) +gfx::source_texture::source_texture(obs_source_t* parent) { - if (!_parent) { + if (!parent) { throw std::invalid_argument("_parent must not be null"); } - _parent = std::make_shared(_parent, false, false); + _parent = std::make_shared(parent, false, false); _rt = std::make_shared(GS_RGBA, GS_ZS_NONE); } diff --git a/source/util-math.cpp b/source/util-math.cpp index e45f6c17..60a7af92 100644 --- a/source/util-math.cpp +++ b/source/util-math.cpp @@ -24,65 +24,65 @@ void* util::vec2a::operator new(size_t count) { - return aligned_alloc(count, 16); + return util::malloc_aligned(16, count); } void* util::vec2a::operator new[](size_t count) { - return aligned_alloc(count, 16); + return util::malloc_aligned(16, count); } void util::vec2a::operator delete(void* p) { - aligned_free(p); + util::free_aligned(p); } void util::vec2a::operator delete[](void* p) { - aligned_free(p); + util::free_aligned(p); } void* util::vec3a::operator new(size_t count) { - return aligned_alloc(count, 16); + return util::malloc_aligned(16, count); } void* util::vec3a::operator new[](size_t count) { - return aligned_alloc(count, 16); + return util::malloc_aligned(16, count); } void util::vec3a::operator delete(void* p) { - aligned_free(p); + util::free_aligned(p); } void util::vec3a::operator delete[](void* p) { - aligned_free(p); + util::free_aligned(p); } void* util::vec4a::operator new(size_t count) { - return aligned_alloc(count, 16); + return util::malloc_aligned(16, count); } void* util::vec4a::operator new[](size_t count) { - return aligned_alloc(count, 16); + return util::malloc_aligned(16, count); } void util::vec4a::operator delete(void* p) { - aligned_free(p); + util::free_aligned(p); } void util::vec4a::operator delete[](void* p) { - aligned_free(p); + util::free_aligned(p); } -std::pair util::SizeFromString(std::string text, bool allowSquare) +std::pair util::size_from_string(std::string text, bool allowSquare) { int64_t width, height; diff --git a/source/util-math.hpp b/source/util-math.hpp index 650e4151..a596b746 100644 --- a/source/util-math.hpp +++ b/source/util-math.hpp @@ -86,7 +86,7 @@ namespace util { static void operator delete[](void* p); }; - std::pair SizeFromString(std::string text, bool allowSquare = true); + std::pair size_from_string(std::string text, bool allowSquare = true); namespace math { // Proven by tests to be the fastest implementation on Intel and AMD CPUs. diff --git a/source/util-memory.hpp b/source/util-memory.hpp index f008c2e8..e7e4c1e8 100644 --- a/source/util-memory.hpp +++ b/source/util-memory.hpp @@ -20,13 +20,6 @@ #pragma once #include -#ifdef _MSC_VER -#define aligned_alloc(a, s) _aligned_malloc(s, a) -#define aligned_free _aligned_free -#else -#define aligned_free free -#endif - namespace util { inline size_t aligned_offset(size_t align, size_t pos) {