mirror of
https://github.com/xodio/xod.git
synced 2026-03-19 23:26:57 +01:00
refactor(xod-arduino, xod-tabtest): define "new" operator only for AVR architecture
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
*
|
||||
*
|
||||
=============================================================================*/
|
||||
#ifndef XOD_NO_PLACEMENT_NEW
|
||||
#ifdef __AVR__
|
||||
// Placement `new` for Arduino
|
||||
void* operator new(size_t, void* ptr) {
|
||||
return ptr;
|
||||
|
||||
@@ -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
|
||||
|
||||
2
workspace/blink/__fixtures__/arduino.cpp
generated
2
workspace/blink/__fixtures__/arduino.cpp
generated
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
2
workspace/lcd-time/__fixtures__/arduino.cpp
generated
2
workspace/lcd-time/__fixtures__/arduino.cpp
generated
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user