From 5da41edf6a4eb24631d9ff07c056f57364cf8034 Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Sun, 18 Jun 2017 21:24:25 +0200 Subject: [PATCH] Removed implementation of `JsonBufferAllocated::delete`. --- src/ArduinoJson/Data/JsonBufferAllocated.hpp | 2 +- src/ArduinoJson/Data/ListNode.hpp | 2 +- src/ArduinoJson/JsonArray.hpp | 2 +- src/ArduinoJson/JsonObject.hpp | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ArduinoJson/Data/JsonBufferAllocated.hpp b/src/ArduinoJson/Data/JsonBufferAllocated.hpp index bd82559a..ff74adc5 100644 --- a/src/ArduinoJson/Data/JsonBufferAllocated.hpp +++ b/src/ArduinoJson/Data/JsonBufferAllocated.hpp @@ -19,7 +19,7 @@ class JsonBufferAllocated { return jsonBuffer->alloc(n); } - void operator delete(void *, JsonBuffer *)throw() {} + void operator delete(void *, JsonBuffer *)throw(); }; } } diff --git a/src/ArduinoJson/Data/ListNode.hpp b/src/ArduinoJson/Data/ListNode.hpp index e59bd536..712e15e1 100644 --- a/src/ArduinoJson/Data/ListNode.hpp +++ b/src/ArduinoJson/Data/ListNode.hpp @@ -18,7 +18,7 @@ namespace Internals { // Used by List and its iterators. template struct ListNode : public Internals::JsonBufferAllocated { - ListNode() : next(NULL) {} + ListNode() throw() : next(NULL) {} ListNode *next; T content; diff --git a/src/ArduinoJson/JsonArray.hpp b/src/ArduinoJson/JsonArray.hpp index f6fdf996..27404fb7 100644 --- a/src/ArduinoJson/JsonArray.hpp +++ b/src/ArduinoJson/JsonArray.hpp @@ -46,7 +46,7 @@ class JsonArray : public Internals::JsonPrintable, // Create an empty JsonArray attached to the specified JsonBuffer. // You should not call this constructor directly. // Instead, use JsonBuffer::createArray() or JsonBuffer::parseArray(). - explicit JsonArray(JsonBuffer *buffer) + explicit JsonArray(JsonBuffer *buffer) throw() : Internals::List(buffer) {} // Gets the value at the specified index diff --git a/src/ArduinoJson/JsonObject.hpp b/src/ArduinoJson/JsonObject.hpp index 136bf415..a3e30ab2 100644 --- a/src/ArduinoJson/JsonObject.hpp +++ b/src/ArduinoJson/JsonObject.hpp @@ -45,7 +45,8 @@ class JsonObject : public Internals::JsonPrintable, // Create an empty JsonArray attached to the specified JsonBuffer. // You should not use this constructor directly. // Instead, use JsonBuffer::createObject() or JsonBuffer.parseObject(). - explicit JsonObject(JsonBuffer* buffer) : Internals::List(buffer) {} + explicit JsonObject(JsonBuffer* buffer) throw() + : Internals::List(buffer) {} // Gets or sets the value associated with the specified key. //