From 047d2def6afa265295bc527b2fa8e40d8d431202 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 26 Aug 2015 10:36:40 +1000 Subject: [PATCH] Post-merge cleanup of extras/cpp_support --- core/cplusplus_operators.cpp | 25 ------------------- examples/cpp_01_tasks/main.cpp | 4 +-- extras/cplusplus/component.mk | 3 --- .../{cplusplus.hpp => cpp_operators.hpp} | 0 4 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 core/cplusplus_operators.cpp delete mode 100644 extras/cplusplus/component.mk rename extras/cpp_support/include/{cplusplus.hpp => cpp_operators.hpp} (100%) diff --git a/core/cplusplus_operators.cpp b/core/cplusplus_operators.cpp deleted file mode 100644 index 86f4477..0000000 --- a/core/cplusplus_operators.cpp +++ /dev/null @@ -1,25 +0,0 @@ -/* Part of esp-open-rtos - * BSD Licensed as described in the file LICENSE - */ -#include -#include - -void *operator new(size_t size) -{ - return malloc(size); -} - -void *operator new[](size_t size) -{ - return malloc(size); -} - -void operator delete(void * ptr) -{ - free(ptr); -} - -void operator delete[](void * ptr) -{ - free(ptr); -} diff --git a/examples/cpp_01_tasks/main.cpp b/examples/cpp_01_tasks/main.cpp index 1295327..cf751d6 100644 --- a/examples/cpp_01_tasks/main.cpp +++ b/examples/cpp_01_tasks/main.cpp @@ -26,7 +26,7 @@ * */ -#include "cplusplus.hpp" +#include "cpp_operators.hpp" #include "task.hpp" #include "queue.hpp" @@ -104,4 +104,4 @@ extern "C" void user_init(void) task_1.task_create("tsk1"); task_2.task_create("tsk2"); -} \ No newline at end of file +} diff --git a/extras/cplusplus/component.mk b/extras/cplusplus/component.mk deleted file mode 100644 index 3f5673d..0000000 --- a/extras/cplusplus/component.mk +++ /dev/null @@ -1,3 +0,0 @@ -# Component makefile for extras/cplusplus - -INC_DIRS += $(ROOT)extras diff --git a/extras/cpp_support/include/cplusplus.hpp b/extras/cpp_support/include/cpp_operators.hpp similarity index 100% rename from extras/cpp_support/include/cplusplus.hpp rename to extras/cpp_support/include/cpp_operators.hpp