diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2025-02-07 12:32:16 +0100 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2025-02-07 12:32:16 +0100 |
| commit | e39508e6f2bac8ae171b496bc3ece7eaa2e63114 (patch) | |
| tree | a6fccec79819e09aab989a49e1e53fc7cb4ea86e /lib/nes/common/utils.hh | |
| parent | 8fd56566520ae93bda64fe335cef9202388c6364 (diff) | |
fix warnings
Diffstat (limited to 'lib/nes/common/utils.hh')
| -rw-r--r-- | lib/nes/common/utils.hh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/nes/common/utils.hh b/lib/nes/common/utils.hh index 460d0d5..9a6194a 100644 --- a/lib/nes/common/utils.hh +++ b/lib/nes/common/utils.hh @@ -35,4 +35,15 @@ namespace nes a = b; b = tmp; } -} // namespace nes
\ No newline at end of file +} // namespace nes + +#ifdef NES_HAS_STDLIB + +#include <new> + +#else + +// Placement new is an API-defined operator for some reason!? +inline void* operator new(decltype(sizeof(int)), void* ptr) { return ptr; } + +#endif
\ No newline at end of file |
