forked from bblanchon/ArduinoJson
Added declaration for placement new because it was not available in Arduino
This commit is contained in:
15
include/ArduinoJson/Internals/PlacementNew.hpp
Normal file
15
include/ArduinoJson/Internals/PlacementNew.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
// Copyright Benoit Blanchon 2014
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
// https://github.com/bblanchon/ArduinoJson
|
||||
|
||||
#ifdef ARDUINO
|
||||
|
||||
inline void *operator new(size_t, void *p) throw() { return p; }
|
||||
|
||||
#else
|
||||
|
||||
#include <new>
|
||||
|
||||
#endif
|
@ -6,11 +6,10 @@
|
||||
|
||||
#include "../include/ArduinoJson/JsonArray.hpp"
|
||||
|
||||
#include <new> // required for placement new
|
||||
|
||||
#include "../include/ArduinoJson/Internals/PlacementNew.hpp"
|
||||
#include "../include/ArduinoJson/Internals/PrettyJsonWriter.hpp"
|
||||
#include "../include/ArduinoJson/JsonBuffer.hpp"
|
||||
#include "../include/ArduinoJson/JsonObject.hpp"
|
||||
#include "../include/ArduinoJson/Internals/PrettyJsonWriter.hpp"
|
||||
|
||||
using namespace ArduinoJson;
|
||||
using namespace ArduinoJson::Internals;
|
||||
|
@ -6,11 +6,10 @@
|
||||
|
||||
#include "../include/ArduinoJson/JsonBuffer.hpp"
|
||||
|
||||
#include <new> // required for the placement new
|
||||
|
||||
#include "../include/ArduinoJson/JsonArray.hpp"
|
||||
#include "../include/ArduinoJson/JsonObject.hpp"
|
||||
#include "../include/ArduinoJson/JsonValue.hpp"
|
||||
#include "../include/ArduinoJson/Internals/PlacementNew.hpp"
|
||||
#include "../include/ArduinoJson/Internals/JsonParser.hpp"
|
||||
|
||||
using namespace ArduinoJson;
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
#include "../include/ArduinoJson/JsonObject.hpp"
|
||||
|
||||
#include <new> // required for placement new
|
||||
#include <string.h> // for strcmp
|
||||
|
||||
#include "../include/ArduinoJson/JsonBuffer.hpp"
|
||||
@ -14,6 +13,7 @@
|
||||
#include "../include/ArduinoJson/JsonValue.hpp"
|
||||
#include "../include/ArduinoJson/Internals/PrettyJsonWriter.hpp"
|
||||
#include "../include/ArduinoJson/Internals/StringBuilder.hpp"
|
||||
#include "../include/ArduinoJson/Internals/PlacementNew.hpp"
|
||||
|
||||
using namespace ArduinoJson;
|
||||
using namespace ArduinoJson::Internals;
|
||||
|
Reference in New Issue
Block a user