refactor(xod-arduino, xod-tabtest): define "new" operator only for AVR architecture

This commit is contained in:
Evgeny Kochetkov
2018-09-17 13:04:28 +03:00
parent c4236b2e73
commit fa9fa42fb9
6 changed files with 5 additions and 7 deletions

View File

@@ -5,7 +5,7 @@
*
*
=============================================================================*/
#ifndef XOD_NO_PLACEMENT_NEW
#ifdef __AVR__
// Placement `new` for Arduino
void* operator new(size_t, void* ptr) {
return ptr;

View File

@@ -2,8 +2,6 @@
#ifndef ARDUINO_H
#define ARDUINO_H
#define XOD_NO_PLACEMENT_NEW
#include <stddef.h> // for size_t
#include <stdint.h> // for uint32_t, etc
#include <string.h> // for strlen

View File

@@ -390,7 +390,7 @@ class XStringCString : public XString {
*
*
=============================================================================*/
#ifndef XOD_NO_PLACEMENT_NEW
#ifdef __AVR__
// Placement `new` for Arduino
void* operator new(size_t, void* ptr) {
return ptr;

View File

@@ -390,7 +390,7 @@ class XStringCString : public XString {
*
*
=============================================================================*/
#ifndef XOD_NO_PLACEMENT_NEW
#ifdef __AVR__
// Placement `new` for Arduino
void* operator new(size_t, void* ptr) {
return ptr;

View File

@@ -390,7 +390,7 @@ class XStringCString : public XString {
*
*
=============================================================================*/
#ifndef XOD_NO_PLACEMENT_NEW
#ifdef __AVR__
// Placement `new` for Arduino
void* operator new(size_t, void* ptr) {
return ptr;

View File

@@ -390,7 +390,7 @@ class XStringCString : public XString {
*
*
=============================================================================*/
#ifndef XOD_NO_PLACEMENT_NEW
#ifdef __AVR__
// Placement `new` for Arduino
void* operator new(size_t, void* ptr) {
return ptr;