diff options
author | Pharap <2933055+Pharap@users.noreply.github.com> | 2018-08-18 09:09:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-18 09:09:15 +0100 |
commit | c6ce36d56cd5e874e60c3ba8a36cc77c307df718 (patch) | |
tree | 73562226d18a76936e479f97d9c2385ac5b49e57 /cores/arduino/new.cpp | |
parent | b7c607663fecc232e598f2c0acf419ceb0b7078c (diff) |
Add placement new operator
Diffstat (limited to 'cores/arduino/new.cpp')
-rw-r--r-- | cores/arduino/new.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cores/arduino/new.cpp b/cores/arduino/new.cpp index cf6f89c..bfb219d 100644 --- a/cores/arduino/new.cpp +++ b/cores/arduino/new.cpp @@ -26,6 +26,10 @@ void *operator new[](size_t size) { return malloc(size); } +void * operator new(size_t size, void * ptr) { + return ptr; +} + void operator delete(void * ptr) { free(ptr); } |