libobs-d3d11: Remove new/delete replacements

MSVC noticed inline is not allowed, and new/delete replacments also
don't belong in a header file. We're also just leaning on
__STDCPP_DEFAULT_NEW_ALIGNMENT__ being 16 for MSVC x64 now.
This commit is contained in:
jpark37 2024-01-09 00:54:55 -08:00 committed by Lain
parent a4f2290026
commit a8866fe3fa
3 changed files with 0 additions and 41 deletions

View file

@ -17,7 +17,6 @@
#pragma once
#include <util/AlignedNew.hpp>
#include <util/windows/win-version.h>
#include <vector>

View file

@ -331,7 +331,6 @@ set(public_headers
obs-source.h
obs.h
obs.hpp
util/AlignedNew.hpp
util/apple/cfstring-utils.h
util/array-serializer.h
util/base.h

View file

@ -1,39 +0,0 @@
/*
* Copyright (c) 2023 Lain Bailey <lain@obsproject.com>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#include "bmem.h"
inline void *operator new(size_t size)
{
return bmalloc(size);
}
inline void operator delete(void *data)
{
bfree(data);
}
inline void *operator new[](size_t size)
{
return bmalloc(size);
}
inline void operator delete[](void *data)
{
bfree(data);
}